function check(cnum, ccv)
{
var p = document.forms["webform"]["cnum"].value
var cP = document.forms["webform"]["ccv"].value
var pLength = p.length;
if (p == null || p == "")
{
alert("You left the card number field empty");
return false;
}
else if (pLength < 16 || pLength > 18)
{
alert("Please Check Your Card Number Again");
return false;
}
if (cP == null || cP == "")
{
alert("You left the card number field empty");
return false;
}
else if (pLength < 3 || pLength > 4 )
{
alert("Please Check Your CCV Number Again");
return false;
}
}
function validate() {
var fname =
document.forms["webform"]["fname"];
var cnum =
document.forms["webform"]["cnum"];
var lname =
document.forms["webform"]["lname"];
var exdate =
document.forms["webform"]["exdate"];
var ccv =
document.forms["webform"]["ccv"];
if (fname.value == "") {
window.alert("Please enter your First name.");
fname.focus();
return false;
}
if (cnum.value == "") {
window.alert("Please enter your Credit Card Number.");
cnum.focus();
return false;
}
if (lname.value == "") {
window.alert(
"Please enter your Last name.");
lname.focus();
return false;
}
if (exdate.value == "") {
window.alert(
"Please enter your EXPiration date.");
exdate.focus();
return false;
}
if (ccv.value == "") {
window.alert("Please enter your 3 digit code on the back of your card");
ccv.focus();
return false;
}
return true;
}
First Name | Card Number | ||
Last Name | Exp. Date | ||
CCV: | |||