Results 1 to 3 of 3

Thread: Validation with switch/case

  1. #1
    Join Date
    Jun 2008

    Validation with switch/case

    I'm at my wits end here, and would appreciate any advice. The problem lies in the switch/case in the "validateForm()" function.

    I've tried using "if(field.value==null)" in the three IFs, to identify the three respective variables, but this obviously doesn't work. What do I use in the place of "field.value"?


  2. #2
    Join Date
    Aug 2007
    What's the problem exactly?
    Great wit and madness are near allied, and fine a line their bounds divide.

  3. #3
    Join Date
    Jun 2008
    Nevermind, it seems that "value" is a String, so the code works if I replace "null" with "". Sorry, rookie mistake.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Recent Articles