Form Validation Help - Possible??

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dave

    #1

    Form Validation Help - Possible??

    Hi,

    I would like to know if this scenario is possible using Javascript.

    Form has input field such as Age, weight etc. If a user does not
    put in data in the field, I would like to open another window and
    ask user why they left it blank. I then want to save that "why data"
    in an access database table. I don't want to force them to put in
    age, but I need to know why they skipped the field.

    Also, I would like to do this through a PDF form vs. HTML.

    Any help and/or references is much appreciated. Code sample even better!

    Thanks,
    Dave
  • Michael Winter

    #2
    Re: Form Validation Help - Possible??

    On Wed, 21 Jan 2004 14:59:55 GMT, Dave <dhostetter@NOS PAMbioreg.com> wrote:
    [color=blue]
    > Form has input field such as Age, weight etc. If a user does not
    > put in data in the field, I would like to open another window and
    > ask user why they left it blank. I then want to save that "why data"
    > in an access database table. I don't want to force them to put in
    > age, but I need to know why they skipped the field.[/color]

    It is possible, but there is no reason to do it. If you are going to save
    the data to a database, which must be done from the server, then you may
    as well direct the user to a page where they can enter your "why data"
    before progressing further.

    Alternatively, just place next to the age input, a text box or a menu that
    they can use to give their reasons.

    Both of these suggestions avoid the issue of a browser with JavaScript
    disabled. However, your approach introduces another problem: a pop-up
    window. My browser will block it, so there's no way for you to get the
    information from me, and I won't be the only one.

    Mike

    --
    Michael Winter
    M.Winter@blueyo nder.co.invalid (replace ".invalid" with ".uk" to reply)

    Comment

    • Dave

      #3
      Re: Form Validation Help - Possible??

      Thanks for the reply. Okay, I agree with your popup assessment. I don't
      really want to clutter the main form, so another page seems good. Can I
      maintain control from the main page so that it takes them back to the
      same point where they were previously?

      Do you know any site with code that might be able to help with this task?

      Especially, the database connection and control of the child page.

      Also, how about this running in a PDF file?

      Thanks,
      Dave


      Michael Winter <M.Winter@bluey onder.co.invali d> wrote in
      news:opr14suusc 5vklcq@news-text.blueyonder .co.uk:
      [color=blue]
      > On Wed, 21 Jan 2004 14:59:55 GMT, Dave <dhostetter@NOS PAMbioreg.com>
      > wrote:
      >[color=green]
      >> Form has input field such as Age, weight etc. If a user does not
      >> put in data in the field, I would like to open another window and
      >> ask user why they left it blank. I then want to save that "why data"
      >> in an access database table. I don't want to force them to put in
      >> age, but I need to know why they skipped the field.[/color]
      >
      > It is possible, but there is no reason to do it. If you are going to
      > save the data to a database, which must be done from the server, then
      > you may as well direct the user to a page where they can enter your
      > "why data" before progressing further.
      >
      > Alternatively, just place next to the age input, a text box or a menu
      > that they can use to give their reasons.
      >
      > Both of these suggestions avoid the issue of a browser with JavaScript
      > disabled. However, your approach introduces another problem: a pop-up
      > window. My browser will block it, so there's no way for you to get the
      > information from me, and I won't be the only one.
      >
      > Mike
      >[/color]

      Comment

      • Michael Winter

        #4
        Re: Form Validation Help - Possible??

        On Wed, 21 Jan 2004 15:41:54 GMT, Dave <dhostetter@NOS PAMbioreg.com> wrote:
        [color=blue]
        > Thanks for the reply. Okay, I agree with your popup assessment. I don't
        > really want to clutter the main form, so another page seems good. Can I
        > maintain control from the main page so that it takes them back to the
        > same point where they were previously?[/color]

        Yes, it too can be done. It will most likely implemented using a session
        cookie, but it could depend on what you have on your page.
        [color=blue]
        > Do you know any site with code that might be able to help with this task?[/color]

        The best place to ask would depend on what language you will use
        server-side.

        ASP:
        General questions: microsoft.publi c.inetserver.as p.general
        Database-related: microsoft.publi c.inetserver.as p.db

        CGI:
        comp.lang.perl
        comp.infosystem s.www.authoring.cgi

        JSP:
        http://java.sun.com/products/jsp/

        PHP:
        comp.lang.php

        [color=blue]
        > Also, how about this running in a PDF file?[/color]

        I don't know anything about PDF scripting. Sorry.

        Mike

        --
        Michael Winter
        M.Winter@blueyo nder.co.invalid (replace ".invalid" with ".uk" to reply)

        Comment

        Working...