S
SA SA
I know it is me but i can not get this condition to work. Regardless of
Check or credit card it always defaults to else portion of the script.
I can't get if (login.PMT_INDICATOR.value == "C") to be true. What i am
doing wrong? please help
<html>
<form method="post" name="login" id="login" >
<input type="hidden" Value ="Account Balance"
name="PMT_TYPE_DESC" >
<input type="radio" Value ="" name="PMT_INDICATOR"> Check
(Checking/Saving Account)<p>
] <input type="radio" Value ="C" checked name="PMT_INDICATOR" >
Credit Cards</p><p>
<input type=button name=submit1 value="Login"
Onclick="SubmitForm(login);">
</p>
</form>
<script type="text/javascript">
<!--
function SubmitForm(login)
{
if (login.PMT_INDICATOR.value == "C")
{
login.action = "https://creditcard.gateway.com/Gateway.aspx";
}
else
{
login.action = "https://Check.gateway.com/Gateway.aspx";
}
login.submit(); // Submit the page
return true;
}
//-->
</script>
</html>
Check or credit card it always defaults to else portion of the script.
I can't get if (login.PMT_INDICATOR.value == "C") to be true. What i am
doing wrong? please help
<html>
<form method="post" name="login" id="login" >
<input type="hidden" Value ="Account Balance"
name="PMT_TYPE_DESC" >
<input type="radio" Value ="" name="PMT_INDICATOR"> Check
(Checking/Saving Account)<p>
] <input type="radio" Value ="C" checked name="PMT_INDICATOR" >
Credit Cards</p><p>
<input type=button name=submit1 value="Login"
Onclick="SubmitForm(login);">
</p>
</form>
<script type="text/javascript">
<!--
function SubmitForm(login)
{
if (login.PMT_INDICATOR.value == "C")
{
login.action = "https://creditcard.gateway.com/Gateway.aspx";
}
else
{
login.action = "https://Check.gateway.com/Gateway.aspx";
}
login.submit(); // Submit the page
return true;
}
//-->
</script>
</html>