SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Addict
    Join Date
    Jun 2001
    Location
    Malaysia
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Incomplete form prompts

    hey guys...

    I've got a form in HTML where I'd like the user to fill in all the details before hitting the Submit button. Right now, the form works, but if a entry is left blank, the form stil gets submitted.

    I'd like to know how to prompt the user that certain areas aren't filled in.. and then reload that form with the headings of each uncompleted section highligted in a different color.

    Can this be done in HTML instead of PHP? It'll save me the trouble of installing PHP compilers and such on a friend's PC

  2. #2
    :) delemtri's Avatar
    Join Date
    Jun 2001
    Posts
    579
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use JavaScript.

  3. #3
    SitePoint Enthusiast
    Join Date
    Aug 2001
    Location
    NJ
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if you dont want to install PHP then your best bet is to use JavaScript--but to do it in php, you would submit the form, and then check to make sure every form was filled in if you would like that done, i could show you how, but i would recommend using JavaScript!
    signature

  4. #4
    SitePoint Addict
    Join Date
    Jun 2001
    Location
    Malaysia
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oooh.. JS huh ?

    Man... can I just grab related code snippets from somewhere and save myself the trouble of a JS refresher course?

  5. #5
    SitePoint Enthusiast
    Join Date
    Aug 2001
    Location
    NJ
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i am sure there is a code snipper for that somewhere...i wish i had a good site for you, i know there is javascript.com, i dont know how good it is? but i am sure they would have something, or atleast point you where you could find one.
    signature

  6. #6
    SitePoint Addict
    Join Date
    Jun 2001
    Location
    Malaysia
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    cool.. thanks, typecero!

  7. #7
    Node mutilating coot timnz's Avatar
    Join Date
    Feb 2001
    Location
    New Zealand
    Posts
    516
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Some users might have javascript disabled though, but if this does not concern you, Javascript would be the way to go.
    Oh no! the coots are eating my nodes!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •