// Javascript Code Copyright Ranson's Scripts 2002 // To use the function/s below, place the tag below in the head of your HTML document. // // The form must be named "Ray" Case Sensitive //
// field names are case sensitive, must match required names exactly. // in the VALUE use a comma between all required fields // to validate an Email Address, the field name="" must contain the word "email" // ie emailaddress - email - emailadd - etc. // in the "Submit" tag, use the following code - onclick="return ValidateForm(this.form);" // If using in a perl script, be sure to place a backslash before any existing // backslash and place a backslash in front of any dollar sign // \\n <- double backslash \$ <- single backslash // this function will validate all fields on the form // all fields must be filled in by the user. // to validate an Email Address, the field name="" must contain the word "email" // ie - emailaddress, email, emailadd, etc. Not case sensitive. // in the "Submit" tag, use the following code - onclick="return ValidateAll(this.form);" function ValidateAll() { var EmailTest = /email/i; for (i=0;i function ValidateUSPhone(Num) { MyExp = /\W/g; PhoneNum = Num.replace(MyExp, ""); if(PhoneNum.length != 10){ alert("Your Phone Number "+PhoneNum+" is incorrect. \n Please re-enter your phone number including area code."); return false; } } // ### *** :) *** ### // # Works for PHP # could not use double quotes. + sign was giving trouble. function ValidateAll() { var EmailTest = /email/i; for (i=0;i