bluedollar
Programmer
I have a some code that is supposed to call a script when a radio box is selected, the code is shown below:
===========================================================
<?php
class checkout3_class {
function chk31() {
echo'<html>';
echo'<head>';
echo'<title></title>';
echo'</head>';
echo'<body>';
echo'<form name="payment" method=POST action="checkout3script.php">';
echo'<table border="0">';
echo'<tr><th colspan="2" align="left" bgcolor="#999999">Delivery Address</th></tr>';
echo'<tr><td colspan="2"><br>Please enter payment details:<P></td></tr>';
}
function creditonline() {
echo'<tr><td><input type="radio" onChange="document.payment.submit();" name="ocredit"</td><td>Pay by Card Via Secure Online Transaction</tr>';
}
function creditphone() {
echo'<tr><td><input type="radio" onChange="document.payment.submit();" name="pcredit"</td><td>Pay by Card Via Phone Transaction</td></tr>';
}
function cheque() {
echo'<tr><td><input type="radio" onChange="document.payment.submit();" name="ocheque"</td><td>Pay by Cheque/Postal Order</td></tr>';
}
function chk32() {
echo'<tr><td colspan="2" align="center"><br><input type="submit" name="details" value="Next"></td></tr>';
echo'</table>';
echo'</form>';
echo'</body>';
echo'</html>';
}
}
?>
==========================================================
PROBLEM
- The script only runs after you have selected two radio boxes.
Question
1) How do you get the script to run after just selecting ONE radio box?
Any help would be greatly appreciated.
Thanks
Dan
===========================================================
<?php
class checkout3_class {
function chk31() {
echo'<html>';
echo'<head>';
echo'<title></title>';
echo'</head>';
echo'<body>';
echo'<form name="payment" method=POST action="checkout3script.php">';
echo'<table border="0">';
echo'<tr><th colspan="2" align="left" bgcolor="#999999">Delivery Address</th></tr>';
echo'<tr><td colspan="2"><br>Please enter payment details:<P></td></tr>';
}
function creditonline() {
echo'<tr><td><input type="radio" onChange="document.payment.submit();" name="ocredit"</td><td>Pay by Card Via Secure Online Transaction</tr>';
}
function creditphone() {
echo'<tr><td><input type="radio" onChange="document.payment.submit();" name="pcredit"</td><td>Pay by Card Via Phone Transaction</td></tr>';
}
function cheque() {
echo'<tr><td><input type="radio" onChange="document.payment.submit();" name="ocheque"</td><td>Pay by Cheque/Postal Order</td></tr>';
}
function chk32() {
echo'<tr><td colspan="2" align="center"><br><input type="submit" name="details" value="Next"></td></tr>';
echo'</table>';
echo'</form>';
echo'</body>';
echo'</html>';
}
}
?>
==========================================================
PROBLEM
- The script only runs after you have selected two radio boxes.
Question
1) How do you get the script to run after just selecting ONE radio box?
Any help would be greatly appreciated.
Thanks
Dan