Link to home
Start Free TrialLog in
Avatar of mmoore500
mmoore500

asked on

Javascript onsubmit problem

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;
}

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Umar Topia
Umar Topia
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
All the same suggestions. How about we wait for the html?
What do you mean by "wait for the html?"
" 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
Hello @mmoore500

are you still looking for further assistance on this question ?
Avatar of mmoore500
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.