title: Firefox javascript error function "undefined" works fine in IE
body: <p>I'm receiving an error in firefox error console "Error: submitSearchForm is not defined"</p>
  
  <p>this is my code for that function</p>
  
  <p><strong>EDIT:</strong> added full code</p>
  
  <pre><code>   function submitSearchForm(action,iskeyDown) {
  
                  var oneEntered = false;
  
                      if(iskeyDown == null || iskeyDown == 'undefined'){
                          copyAndValidate("dobFrom", "searchCriteria.dob", "date");
                          copyAndValidate("dobTo", "searchCriteria.dobTo", "date");
                          copyAndValidate("dodFrom", "searchCriteria.dodFrom", "date");
                          copyAndValidate("dodTo", "searchCriteria.dodTo", "date");
                          copyAndValidate("searchCriteria.age", "searchCriteria.age", "integer");
                      }else{
                          copyAndValidate("dobFrom_date", "searchCriteria.dob", "date");
                          copyAndValidate("dobTo_date", "searchCriteria.dobTo", "date");
                          copyAndValidate("dodFrom_date", "searchCriteria.dodFrom", "date");
                          copyAndValidate("dodTo_date", "searchCriteria.dodTo", "date");
                          copyAndValidate("searchCriteria.age", "searchCriteria.age", "integer");
                      }
  
  
  
                      var elements = document.SearchForm.getElementsByTagName("INPUT");
                      for (var i = 0; i &lt; elements.length; i++) {
                          var element = elements[i];
                          if (element != null &amp;&amp; element.getAttribute("group") == 'searchCriteria') {
                              if (!isEmpty(element.value)) {
                                  oneEntered = true;
                                  break;
                              }
                          }
                      }
  
                  if (oneEntered)
  
                       {
  
                           if (validate(document.SearchForm)) {
  
                                      document.SearchForm.action.value = action;
                                        document.SearchForm.submit();
                                }
  
                  } 
  
  
                  else {
                      alert("&lt;%= bpt.getValue("CCT_ATLEASTONE_MSG") %&gt;");
                  }
  
  
              }
  </code></pre>
  
  <p><strong>button</strong></p>
  
  <pre><code>onclick="&lt;%="submitSearchForm('"+SearchForm.ACTION_SEARCH +"');"%&gt;"
  </code></pre>
  
  <p>just to say again everything works fine in IE so the code is correct</p>
  
  <p><strong>EDIT: VALIDATION.JS validate()</strong></p>
  
  <pre><code>function validate(thisForm) {
  
     window.event.returnValue = false;
     formToValidate = thisForm;
     var ret = true;
     var validationErrors = new Array();
  
     // get the validateable items
     // var validateThese = getValidationItems(thisForm.childNodes);
     var validateThese = getValidationItems(thisForm);
     //printValidationArray(validateThese);
  
     // validate them
     for (var i = 0; i &lt; validateThese.length; i++) {
       var validationItem = validateThese[i];
       var validationError = validateMe(validationItem);
       if (validationError != "") {
         validationErrors[validationErrors.length] = validationError;
       }
     }
  
     // check for validation errors
     if (validationErrors.length &gt; 0) {
       var errors = "";
       for (var j = 0; j &lt; validationErrors.length; j++) {
           errors += validationErrors[j] + "\n";
       }
       alert("Validation Errors:\n" + errors);
       ret = false;
     } else {
       ret = true;
     }
     return ret;
   }
  </code></pre>