I am trying to validate a form using javascript. The the form is slightly different depending on whether or not the previous page selection is "exhibitor" or "attendee."
I have onsubmit="return validate()" and it works properly if the client chooses "attendee", but it doesn't work if the client chooses "exhibitor."
function validate(){ var returnVal; if( (document.getElementById('MemberYes').checked==false) && (document.getElementById('MemberNo').checked==false) ) { returnVal = false; } return returnVal;}
All the same suggestions. How about we wait for the html?
chintanpshah
What do you mean by "wait for the html?"
Michel Plungjan
" works properly if the client chooses "attendee", but it doesn't work if the client chooses "exhibitor."
seems to me we should have a look to see if the snippet posted has anything at all to do with the error.
Now we one suggestion that does not do anything differently except waste a var and 3 suggestions that all work the same but it is possible that none of them solves the issue
are you still looking for further assistance on this question ?
mmoore500
ASKER
Hey guys, sorry for neglecting this today. I appreciate all of the responses. I've got a tight deadline and I got this figured out earlier. I just retyped part of the function (there was more to it than I posted) and it worked. I didn't even try to figure out what was wrong (I wrote it on no sleep and just rewrote it after I got a little). It looks like 5 of you guys chipped in comments, so I'll spread the points evenly amongst you all.
Thanks again and sorry for not getting back sooner.