C
Crystal
Ok, I have a select box with different methods of payment (bill
account, telecheck, credit card, ect) If Credit Card is selected, I
need to be able to require a valid credit card number based on the
card type selected... Any clues?
This is what I have so far:
if (theForm.selMethod.selectedIndex.value == "2")
{
if (theForm.txtCCNumber.value.length < 10)
{
alert('A Valid Credit Card Number is required for the payment method
you have selected.')
theForm.txtCCNumber.focus()
return (false);
}
return(false);
<select name="selMethod">
<option value="1" <%Call RequestInfo("selMethod","1")%>>Bill
Account</option>
<option value="2" <%Call RequestInfo("selMethod","2")%>>Credit
Card</option>
<option value="3" <%Call RequestInfo("selMethod","3")%>>Certified
Funds</option>
<option value="4" <%Call
RequestInfo("selMethod","4")%>>Telecheck</option>
</select>
<select name="selCard">
<option value="1" <%Call RequestInfo("selCard","1")%>>Visa</option>
<option value="2" <%Call RequestInfo("selCard","2")%>>Amex</option>
<option value="3" <%Call
RequestInfo("selCard","3")%>>Mastercard</option>
<option value="4" <%Call
RequestInfo("selCard","4")%>>Discover</option>
</select>
basically...
Any ideas?
account, telecheck, credit card, ect) If Credit Card is selected, I
need to be able to require a valid credit card number based on the
card type selected... Any clues?
This is what I have so far:
if (theForm.selMethod.selectedIndex.value == "2")
{
if (theForm.txtCCNumber.value.length < 10)
{
alert('A Valid Credit Card Number is required for the payment method
you have selected.')
theForm.txtCCNumber.focus()
return (false);
}
return(false);
<select name="selMethod">
<option value="1" <%Call RequestInfo("selMethod","1")%>>Bill
Account</option>
<option value="2" <%Call RequestInfo("selMethod","2")%>>Credit
Card</option>
<option value="3" <%Call RequestInfo("selMethod","3")%>>Certified
Funds</option>
<option value="4" <%Call
RequestInfo("selMethod","4")%>>Telecheck</option>
</select>
<select name="selCard">
<option value="1" <%Call RequestInfo("selCard","1")%>>Visa</option>
<option value="2" <%Call RequestInfo("selCard","2")%>>Amex</option>
<option value="3" <%Call
RequestInfo("selCard","3")%>>Mastercard</option>
<option value="4" <%Call
RequestInfo("selCard","4")%>>Discover</option>
</select>
basically...
Any ideas?