Okay I've got this page and it happens to have two sets of radio buttons. On test, I select one of the first set and I get a Javascript alert that tells me "true". I don't know where it came from or how to get rid of it. I don't want it to do that, of course... In any case, I've removed a bunch of the JS (validation script) and I get the alert regardless. Can someone take a look at this and show me what the heck is going on?? lol... Any help here SUPER appreciated..
- Code: Select all
<html>
<head>
<style type="text/css">
#Div1, #Div2, #Div3
{
DISPLAY: none;
}
</style>
<title>Monthly Payment Options</title>
<link href="cssALL.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/javascript">
//toggle feedback
function Toggle(theDiv) {
document.getElementById("Div1").style.display = "none";
document.getElementById("Div2").style.display = "none";
document.getElementById("Div3").style.display = "none";
document.getElementById(theDiv).style.display = "block";
}
//toggle feedback
function toggle2( targetOpen, targetClose ){
if (document.getElementById){
targetO = document.getElementById( targetOpen );
targetC = document.getElementById( targetClose );
if (targetO.style.display == "none"){
targetO.style.display = "";
targetC.style.display = "none";
}
// else {targetO.style.display = "none";}
}
}
</script>
</head>
<body id="MakeAPayment">
print ("<div class=\"row3\"><p class=\"pmtheads2\">Please choose one:</span>
<label for=\"Check\">Check</label><span lass=\"formw3\">
<input name=\"ToggleDivs\" type=\"radio\" value=\"Check\" onClick=\"Toggle('Div1');alert(document.formInsertRecord.ToggleDivs[ 0 ].checked)\" id=\"Div11\"></span>
<label for=\"Credit\">Credit</label><span class=\"formw3\">
<input name=\"ToggleDivs\" type=\"radio\" value=\"Credit\" onClick=\"Toggle('Div2');alert(document.formInsertRecord.ToggleDivs[ 1 ].checked)\" id=\"Div22\" ></span>
<label for=\"EasyPay\">EasyPay</label><span class=\"formw3\">
<input name=\"ToggleDivs\" type=\"radio\" value=\"EasyPay\" onClick=\"Toggle('Div3');alert(document.formInsertRecord.ToggleDivs[ 2 ].checked)\" id=\"Div33\"></span></div><br>\n");
print ("<div id=\"Div1\" style=\"display:none;\"><br>\n");
print ("<div class=\"row\"><span class=\"label\"><span class=\"asterisk\">*</span>Credit Card Type:</span><span class =\"formw3\"><select name=\"selectCCType\"> ");
foreach ($CCList_array as $ctype2)
{
print("<option>" . $ctype2 . "</option>");
}
print ("</select></span></div>\n");
print ("<div class=\"row\"><span class=\"label\"><span class=\"asterisk\">*</span>Name on Card:</span><span class=\"formw2\"><input name=\"textCCName\" /></span></div>\n");
print ("<div class=\"row\"><span class=\"label\"><span class=\"asterisk\">*</span>Credit Card Number:</span><span class=\"formw2\"><input name=\"textCCNumber\" /></span></div>\n");
print ("<div class=\"row\"><span class=\"label\"><span class=\"asterisk\">*</span>Expiration Month and Year:</span><span class =\"formw3\"><select name=\"selectCCExpMonth\">");
foreach ($ExpMonth_array as $ctype3)
{
print("<option>" . $ctype3 . "</option>");
}
print ("</select></span>\ ");
print ("<span class =\"formw3\"><select name=\"selectCCExpYear\">");
foreach ($ExpYear_array as $ctype4)
{
print ("<option>" . $ctype4 . "</option>");
}
print ("</select></span></div></div>\n");
//Payment Types - Check//
print ("<div id=\"Div2\" style=\"display:none;\"><br>\n");
print ("<div class=\"row\"><span class=\"label\"><span class=\"asterisk\">*</span>Name on Check:</span><span class=\"formw2\"><input name=\"textCHName\" /></span></div>\n");
print ("<div class=\"row\"><span class=\"label\"><span class=\"asterisk\">*</span>Check Number:</span><span class=\"formw2\"><input name=\"textCHNumber\" /></span></div>\n");
print ("<div class=\"row\"><span class=\"label\"><span class=\"asterisk\">*</span>Account Number:</span><span class=\"formw2\"><input name=\"textCHAccountNum\" /></span></div>\n");
print ("<div class=\"row\"><span class=\"label\"><span class=\"asterisk\">*</span>Routing Number:</span><span class=\"formw2\"><input name=\"textCHRouting\" /></span></div>\n");
print ("<div class=\"row\"><span class=\"label\"><span class=\"asterisk\">*</span>Bank Name:</span><span class=\"formw2\"><input name=\"textCHBank\" /></span></div>\n");
print ("<div class=\"row\"><span class=\"label\"><span class=\"asterisk\">*</span>Payment Date:</span><span class=\"formw2\"><input name=\"textCHDate\" /></span></div></div><br>\n");
//Payment Types - EasyPay System//
print ("<div id=\"Div3\" style=\"display:none;\">\n");
print ("<div class=\"row99\"><div class=\"row34\"><p class=\"pmtheads3\ align=\"center\">No Postage. No worries. You tell us the day and <br> the amount, we take care of the rest. Take it easy <br>and get set up on our continuous payment plan.</p></div></div><br>\n");
print ("<div class=\"row3\"><p class=\"pmtheads2\"><span class=\"asterisk\">*</span>Please choose one: </span> <label for=\"label5\">EasyPay by Check</label><span class=\"formw3\">
<input name=\"PaymentType2\" type=\"radio\" value=\"CheckEP\" onClick=\"toggle2('checkInfoEP', 'creditInfoEP')\"id=\"checkEP\"></span>
<label for=\"label6\">EasyPay by Credit</label><span class=\"formw3\"><input name=\"PaymentType2\" type=\"radio\" value=\"CreditEP\" onClick=\"toggle2('creditInfoEP', 'checkInfoEP')\" id=\"creditEP\" ></span> </div><br>\n");
//PT - EasyPay - Credit//
print ("<div id=\"creditInfoEP\" style=\"display:none;\"><br>\n");
print ("<div class=\"row\"><span class=\"label\"><span class=\"asterisk\">*</span>Credit Card Type:</span><span class =\"formw3\"><select name=\"selectCCType\"> ");
foreach ($CCList_array as $ctype2)
{
print("<option>" . $ctype2 . "</option>");
}
print ("</select></span></div>\n");
print ("<div class=\"row\"><span class=\"label\"><span class=\"asterisk\">*</span>Name on Card:</span><span class=\"formw2\"><input name=\"textCCName\" /></span></div>\n");
print ("<div class=\"row\"><span class=\"label\"><span class=\"asterisk\">*</span>Credit Card Number:</span><span class=\"formw2\"><input name=\"textCCNumber\" /></span></div>\n");
print ("<div class=\"row\"><span class=\"label\"><span class=\"asterisk\">*</span>Expiration Month and Year:</span><span class =\"formw3\"><select name=\"selectCCExpMonth\">");
foreach ($ExpMonth_array as $ctype3)
{
print("<option>" . $ctype3 . "</option>");
}
print ("</select></span>\ ");
print ("<span class =\"formw3\"><select name=\"selectCCExpYear\">");
foreach ($ExpYear_array as $ctype4)
{
print("<option>" . $ctype4 . "</option>");
}
print ("</select></span></div>\n");
print ("<div class=\"row\"><span class=\"label\"><span class=\"asterisk\">*</span>Day of Month to be Drafted:</span><span class=\"formw2\"><input name=\"textRecurringDate\" /></span></div></div>\n");
//PT - EasyPay - Check//
print ("<div id=\"checkInfoEP\" style=\"display:none;\"><br>\n"); print ("<div class=\"row\">
<span class=\"label\"><span class=\"asterisk\">*</span>Check Number:</span><span class=\"formw2\"><input name=\"textCHNumber\" /></span></div>\n");
print ("<div class=\"row\"><span class=\"label\"><span class=\"asterisk\">*</span>Account Number:</span><span class=\"formw2\"><input name=\"textCHAccountNum\" /></span></div>\n");
print ("<div class=\"row\"><span class=\"label\"><span class=\"asterisk\">*</span>Routing Number:</span><span class=\"formw2\"><input name=\"textCHRouting\" /></span></div>\n");
print ("<div class=\"row\"><span class=\"label\"><span class=\"asterisk\">*</span>Bank Name:</span><span class=\"formw2\"><input name=\"textCHBank\" /></span></div>\n");
print ("<div class=\"row\"><span class=\"label\"><span class=\"asterisk\">*</span>Day of Month to be Drafted:</span><span class=\"formw2\"><input name=\"textRecurringDate\" /></span></div></div></div>\n");
print ("</div>\n");
print ("\n");
print ("</form></div></div>\n");
?>
</div>
</body>
</html>