hey i have two radio buttons: 'Accept' and 'Don't Accept'
when the form submit button is pressed and the 'Accept' radio is not checked i want the page to reload without sending the info accross...
<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 as it keeps on sending the form and going to next page...
can anyone help???????????