Gossamer Forum
Home : General : Internet Technologies :

help debugging javascript

Quote Reply
help debugging javascript
Been banging my head against the wall, can't figure this one out...

I've got a simple form, just trying to validate certain required fields before submission. It worked fine until I started checking one of the fields against a regex... Now it just gives me object expected errors. Any advice would be very much appreciated:

Code:
<script language="javascript" type="text/javascript">
function appVerify() {
var einFlag = false;
einFlag = /^[0-9]{9}$/.test(document.myform.fiscal_legalTaxID.value);
if(document.myform.fiscal_legalName.value=="" ||
document.myform.fiscal_legalTaxID.value=="" ||
!document.myform.fiscal_projectCategory.selectedIndex ||
document.myform.fiscal_projectDescription.value=="" ||
document.myform.fiscal_qualifications.value=="" ||
document.myform.fiscal_contactChecks.value=="" ||
document.myform.fiscal_contactReceipts.value=="") {
alert("Please fill in all required fields.");
return false;
} elseif(!einFlag) {
alert("Please enter a valid EIN without hyphens.");
return false;
} else {
document.myform.submit();
}
}
</script>

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund

Last edited by:

hennagaijin: Jan 28, 2003, 12:54 PM
Subject Author Views Date
Thread help debugging javascript hennagaijin 6537 Jan 28, 2003, 12:51 PM
Thread Re: [hennagaijin] help debugging javascript
Paul 6277 Jan 28, 2003, 1:00 PM
Thread Re: [Paul] help debugging javascript
hennagaijin 6318 Jan 28, 2003, 1:04 PM
Thread Re: [hennagaijin] help debugging javascript
Paul 6295 Jan 28, 2003, 2:01 PM
Thread Re: [Paul] help debugging javascript
hennagaijin 6307 Jan 28, 2003, 7:48 PM
Post Re: [hennagaijin] help debugging javascript
beetleman 6203 Mar 28, 2003, 7:33 AM