I have this event handler for the submit button. I want it to check to be sure there is no number entered in the field "ccnumber" on my form and then if that field is empty then post it to my .asp page --> my syntax stinks so could someone look over my code and let me know whats up?
function btnSubmit_onclick() {
if (form.ccnumber.value.length > 0) {
alert("Please remove Credit Card Number.");
form.ccnumber.focus();
return;
else
document.thisForm.hidReload.value = "reload";
document.thisForm.action = "AdminEditGroup-JP.asp";
document.thisForm.submit("post");
}
function btnSubmit_onclick() {
if (form.ccnumber.value.length > 0) {
alert("Please remove Credit Card Number.");
form.ccnumber.focus();
return;
else
document.thisForm.hidReload.value = "reload";
document.thisForm.action = "AdminEditGroup-JP.asp";
document.thisForm.submit("post");
}
Comment