
Linking Form Objects in HTML to other Form Objects using VBScript
<HTML>
<HEAD>
<script language=VBScript>
sub btn_onclick()
for each r in rad
if r.checked then
choice = r.value
exit for
end if
next
msgbox choice
end sub
</script>
</HEAD>
<BODY>
<input name=rad type=radio value=1 checked>Option 1<br>
<input name=rad type=radio value=2 >Option 2<br>
<input name=rad type=radio value=3 >Option 3<br>
<input name=rad type=radio value=4 >Option 4<br>
<input name=rad type=radio value=5 >Option 5<br>
<input name=btn type=button value="Do it..">
</BODY>
</HTML>
--
Michael Harris
I have two Radio Button that use the same name therefore they can only
choose one or the other.
If the user clicks Button 1, I want it to go to option box 1, and if the
user clicks Button 2 then I want the next step to be option box 2.
If Button 1 is clicked then, option box 1 is a valid step, and option box 2
is invalid and cant be used. Same for the opposite.
I tried to make this clear, but if I didn't just post a "don't understand"
or something.
I think all I need is one certain event handler and some sort of "If"
"Then" statement, but I am not sure.
Please Help.
Ben