VolkNet
05-10-2005, 05:52 PM
I am having trouble obtaining the value of what radio button has been selected.
i have this in the head
...
function setCook(){
if(document.forms['Signup'].package_type.value == 'gold'){
alert('gold!!');
}
else if(document.forms['Signup'].package_type.value =='silver'){
alert('SILVER!');
}
else alert('fail');
}
...
Then i have a form as so.
<form name="Signup" id="Signup" method="post" action="https://www.paypal.com/cgi-bin/webscr" onSubmit="setCook();">
<input name="package_type" id="package_type" type="radio" onClick="updateForm_link();" value="silver" checked>
<input type="radio" name="package_type" id="package_type" value="gold" onClick="updateForm_art();">
...
</form>
This always returns with "fail" :( Can someone shed some light? Thanks :)
i have this in the head
...
function setCook(){
if(document.forms['Signup'].package_type.value == 'gold'){
alert('gold!!');
}
else if(document.forms['Signup'].package_type.value =='silver'){
alert('SILVER!');
}
else alert('fail');
}
...
Then i have a form as so.
<form name="Signup" id="Signup" method="post" action="https://www.paypal.com/cgi-bin/webscr" onSubmit="setCook();">
<input name="package_type" id="package_type" type="radio" onClick="updateForm_link();" value="silver" checked>
<input type="radio" name="package_type" id="package_type" value="gold" onClick="updateForm_art();">
...
</form>
This always returns with "fail" :( Can someone shed some light? Thanks :)
