sundance1980
MIS
Hello I really do not know much javascript so I wont beat around the bush. I am trying to change a forms action based on radio buttons that the users selects.
For example:
Radio 1 is selected the action would be search.asp
If radio2 is selected then action would be searchsite.asp
Is this possible with javascript?
Can anyone show me an example that I can tweak.
This is what I have so far:
For example:
Radio 1 is selected the action would be search.asp
If radio2 is selected then action would be searchsite.asp
Is this possible with javascript?
Can anyone show me an example that I can tweak.
This is what I have so far:
Code:
<form action="+ need to change this value +" method="post" name="entry" >
<input type="text" name="search_value" size="26"> <br>
<input type="radio" name="group1" value="radio1" checked>
<font size="1" face="Verdana, Arial, Helvetica, sans-serif">Radio 1</font>
<input type="radio" name="group1" value="radio2">
<font size="1" face="Verdana, Arial, Helvetica, sans-serif">Radio2</font>
<input type="submit">
</form>
Code:
script language="JavaScript">
if (form == radio1)
{
document.writeln("do something");
}
else
{
document.writeln("do something");
}
;
// end hiding code -->
</script>
i have no clue on what is going on but I thought it might be worth a try.