i have two radio buttons: 'Accept' and 'Don't Accept'
if the 'Accept' radio is not checked when the form gets submitted i would like the page to reload without sending any info...
<form id="form1" name="form1" method="post" action="PaymentFormProcess.php">
<table width="80%" align="center">
<tr>
<td width="43%"><strong>Do you accept these terms and conditions?</strong></td>
<td width="29%" align="right"><p>
<label>
<input type="radio" name="TermsConditions" value="Accept" id="TermsConditions_0" />
I Accept</label>
</p></td>
<td width="28%" align="right"><label>
<input type="radio" name="TermsConditions" checked="checked" value="Decline" id="TermsConditions_1" />
I do not Accept</label>
</td>
</tr>
</table>
<label for="ConfirmBooking">Confirm Booking:</label>
<input type="submit" name="ConfirmBooking" id="ConfirmBooking" value="Confirm Booking" onclick="Accept()" />
</form>
function Accept()
{
if(!document.getElementById('TermsConditions_0').checked == true)
{
alert("You must Accept terms before booking can be made");
//window.location.reload(true);//window.location.reload();
window.location.href= 'http://Payment.php';//window.location.href
}
}
none of the above work...
can anyone help please????????