Results 1 to 1 of 1
Dec 3, 2008, 12:55 #1
- Join Date
- May 2008
- 0 Post(s)
- 0 Thread(s)
jQuery - Checking a Variable / Array
I am a bit of a beginner when it comes to jQuery, as you will probably be able to guess from the attempt at getting something to work below!
Basically, the application of this is to validate a form, and show / hide helpful messages / congratulations. This part of the script I've managed to work out (after all, it's just if / else and .show() or .hide() ), but I managed to confuse myself when it comes to allowing the submit button to be pressed (by changing the value and disabeled state). I have worked out the changing of the value, but, the if / else statement isn't changing depending on the form values. What I expect it to be doing (it's an old scrip.aculo.us script, that I changed to jQuery), is validating each and every input, and setting the value of email to true if it's correct, or false if not correct, and then a function checking this.
Edit: just remembered, i made it only check if email was true or not to work out some debugging, in the actual script, I need to find an eficent way to kill all the birds with one stone (by using the master_switch val initilized, in which, some of that code may not work in jQuery I believe.