davegr
06-02-2002, 05:17 AM
Hi,
Really stupid one, but I cannot see my way through!
I have a form, which will be submitted to an asp page. I want to check that one of 2 radio buttons have been selected in vbscript before the submit takes place.
It is easy enough to check the contents of a text box, by using FORMNAME.TEXTBOXNAME.VALUE
This does not work with radio buttons. Any idea how one tests whether the radio buttons have been pushed?
Example Code for the Form follows...
<form action="total.asp" name=quest id=quest method=post>
<P align=center>Do you drink Coffee?</P>
<br>
<p align=center><input id=t name=t type=textbox></p>
<P align=center><INPUT id=yesno name=yesno type=radio value=1>Yes</P>
<P align=center><INPUT id=yesno name=yesno type=radio value=2>No</P>
<br>
<P align=center><INPUT id=subm type=button value="Vote" name = subm ></P>
</form>
On clicking on the button I hop to the vbscript, which is where I need to insert the correct code to get a value of 1 or 2 back from the form before sending to ASP page.
Any Ideas?
Really stupid one, but I cannot see my way through!
I have a form, which will be submitted to an asp page. I want to check that one of 2 radio buttons have been selected in vbscript before the submit takes place.
It is easy enough to check the contents of a text box, by using FORMNAME.TEXTBOXNAME.VALUE
This does not work with radio buttons. Any idea how one tests whether the radio buttons have been pushed?
Example Code for the Form follows...
<form action="total.asp" name=quest id=quest method=post>
<P align=center>Do you drink Coffee?</P>
<br>
<p align=center><input id=t name=t type=textbox></p>
<P align=center><INPUT id=yesno name=yesno type=radio value=1>Yes</P>
<P align=center><INPUT id=yesno name=yesno type=radio value=2>No</P>
<br>
<P align=center><INPUT id=subm type=button value="Vote" name = subm ></P>
</form>
On clicking on the button I hop to the vbscript, which is where I need to insert the correct code to get a value of 1 or 2 back from the form before sending to ASP page.
Any Ideas?