Share Pastebin
Guest
Public paste!

matt

By: a guest | Feb 18th, 2008 | Syntax: None | Size: 0.52 KB | Hits: 29 | Expires: Never
Copy text to clipboard
  1. function Validator(frmname)
  2. {
  3.   this.formobj=document.forms[frmname];
  4.         if(!this.formobj)
  5.         {
  6.           alert("BUG: couldnot get Form object "+frmname);
  7.                 return;
  8.         }
  9.         if(this.formobj.onsubmit)
  10.         {
  11.          this.formobj.old_onsubmit = this.formobj.onsubmit;
  12.          this.formobj.onsubmit=null;
  13.         }
  14.         else
  15.         {
  16.          this.formobj.old_onsubmit = null;
  17.         }
  18.         this.formobj.onsubmit=form_submit_handler;
  19.         this.addValidation = add_validation;
  20.         this.setAddnlValidationFunction=set_addnl_vfunction;
  21.         this.clearAllValidations = clear_all_validations;
  22. }