title: jquery validation 'this.0.form' is null or not an object
body: <p>My code is causing ie7 to throw this error. 'this.0.form' is null or not an object
  There's a button that triggers the form to submit when it's clicked
  when this happens the form is validated but the validation plugin. In other browsers this works flawlessly. In ie7 it crashes and burns throwing the above error.</p>
  
  <pre><code>$(document).ready(function(){
      //form rotate to next section
      window.section = 1;
      function secnext()
      {
          var current;
          var next;
          var valid;
          current = window.section;        
          //on next validate fields
          //if not valid submit form to return errors and return 0
          switch(current)
          {
              case 1:
              valid = section1();
              break;
              case 2:
              valid = section2();
              break;
              case 3:
              valid = section3();
              break;
              case 4:
              valid = section4();
          }
          if(valid == false) return 0;
  
          //if(current == 4) next == 0;
          next = current+1;
          if(current == 1) $('#previous').parent().show('slow');
          //hide current
          $('#section'+current).hide('slide',500,function()
          {
              $('#section'+next).show('slide',500);});
              //display next
  
              //setTimeout(function() { $('#section'+next).slideToggle('slow');}, 300);
              if(next == 4)
              {
                  $('#next').parent().hide('slow');
                  $('#sendbutton').parent().parent().show('slow');
              }
              window.section = next;
          }
          $('#next').click(function() 
          {
              //$dialog.dialog("open");        
              secnext();
              //setTimeout(function() { $dialog.dialog("close"); }, 1500);    
  
          });
          // hide section by section if all fields are valid and focus is in different section
          function section1()
          {
              if($('input#fname').valid() &amp;&amp;
              $('input#lname').valid() &amp;&amp;
              $('input#email').valid() &amp;&amp;
              $('input#homephone').valid() &amp;&amp;
              $('select#ismilitary').valid())
              {
                  return true;
              } else {
                  $('form#creditapp').submit();
                  return false;
              }
          }
          function section2()
          {
              if($('input#address').valid() &amp;&amp;
              $('input#city').valid() &amp;&amp;
              $('input#state').valid() &amp;&amp;
              $('input#zip').valid() &amp;&amp;
              $('select#dob_month').valid() &amp;&amp;
              $('select#dob_day').valid() &amp;&amp;
              $('select#dob_year').valid() &amp;&amp;
              $('input#ssn').valid() &amp;&amp;
              $('input#dlnum').valid() &amp;&amp;
              $('input#dlst').valid())
              {
                  return true;
              } else {
                  $('form#creditapp').submit();
                  return false;
              }     
      }
      function section3()
      {
              if($('input#employer').valid() &amp;&amp; $('input#workphone').valid() &amp;&amp; $('select#employed_year').valid() &amp;&amp; $('select#employed_month').valid() 
              &amp;&amp; $('select#paymethod').valid() &amp;&amp; $('select#incomesrc').valid() &amp;&amp; $('input#paychkamount').valid() &amp;&amp; $('select#payfreq').valid() 
              &amp;&amp; $('input#nextpayday1').valid() &amp;&amp; $('input#nextpayday2').valid())
              {
                  return true;
              } else {
                  $('form#creditapp').submit();
                  return false;
              }
      }
      function section4()
      {
              if($('input#bankname').valid() &amp;&amp; $('select#acctype').valid() &amp;&amp; $('input#routingnum').valid() &amp;&amp; $('input#accnum').valid())
              {
                  return true;
              } else {
                  $('form#creditapp').submit();
                  return false;
              }
      }
      /*section1();
      section2();
      section3();
      section4();*/
      /**
       * assign click handler to button
       * on button click reassign focus event to section and hide button
      **/ 
      /*$('.button').click(function(index){
          switch($(this).parent().parent().attr('id'))
          {
              case 'button1':
                  $('#button1').slideToggle('slow');
                  $('#section1').slideToggle('slow');
                  section1();
                  break;
              case 'button2':
                  $('#button2').slideToggle('slow');
                  $('#section2').slideToggle('slow');
                  section2();
                  break;
              case 'button3':
                  $('#button3').slideToggle('slow');
                  $('#section3').slideToggle('slow');
                  section3();
                  break;
              case 'button4':
                  $('#button4').slideToggle('slow');
                  $('#section4').slideToggle('slow');
                  section4();
                  break;
          }
      });*/
  
      function hidesections()
      {
          /*if($('input#fname').valid() &amp;&amp; $('input#lname').valid() &amp;&amp; $('input#email').valid() &amp;&amp; $('input#homephone').valid() &amp;&amp; $('select#ismilitary').valid())
          {
              $('#section1').hide('slow');
          }
          if($('input#address').valid() &amp;&amp; $('input#city').valid() &amp;&amp; $('input#state').valid() &amp;&amp; $('input#zip').valid() &amp;&amp; $('[name="bday"]').valid() 
          &amp;&amp; $('input#ssn').valid() &amp;&amp; $('input#dlnum').valid() &amp;&amp; $('input#dlst').valid())
          {
              $('#section2').hide('slow');
          }
          if($('input#employer').valid() &amp;&amp; $('input#workphone').valid() &amp;&amp; $('select#employed_years').valid() &amp;&amp; $('select#employed_months').valid() 
          &amp;&amp; $('select#paymethod').valid() &amp;&amp; $('select#incomesrc').valid() &amp;&amp; $('input#paychkamount').valid() &amp;&amp; $('select#payfreq').valid() 
          &amp;&amp; $('input#nextpayday1').valid() &amp;&amp; $('input#nextpayday2').valid())
          {
              $('#section3').hide('slow');
          }
          if($('input#bankname').valid() &amp;&amp; $('select#acctype').valid() &amp;&amp; $('input#routingnum').valid() &amp;&amp; $('input#accnum').valid())
          {
              $('#section4').hide('slow');
          }*/
      }
      //save whole form
      function saveform()
      {
          var data = '';
          $('input').each(function(index) {
              data += $(this).attr('name')+'='+$(this).val()+'&amp;';
          });
          $('select').each(function(index) {
              if($(this).attr('name') != 'employed_years' &amp;&amp; $(this).attr('name') != 'dob_month' &amp;&amp; $(this).attr('name') != 'dob_day')
              {
                  switch($(this).attr('name'))
                  {
                      case 'employed_months':
                          value = $('select#employed_years').val() * 12
  + $('select#employed_months').val();
                          data += 'emplength='+value+'&amp;';
                          break;
                      case 'dob_year':
                          value = $('select#dob_month').val()+'/'+$('select#dob_day').val()+'/'+$('select#dob_year').val();
                          data += 'bday='+value+'&amp;';
                          break;
                      default:
                          data += $(this).attr('name')+'='+$(this).val()+'&amp;';
                  }
              }
          });
          $.ajax({
             type: "POST",
             url: "submit.php?type=form",
             data: data,
             success: function(msg){
               //alert('Your Application has been sent');
               window.location = "http://www.galleryhomestore.com/success";
             }
           });
      }     //validation $('#creditapp').validate({
          /*groups: {
              bday: "dob_month dob_day dob_year"
          },
          errorPlacement: function(error, element) {
              if (element.attr("name") == "dob_month" 
                       || element.attr("name") == "dob_day" || element.attr("name") == "dob_year")
                  error.insertAfter("#dob_year");
              else
                  error.insertAfter(element);
          },*/
          submitHandler: function() {
              //alert('submitted');
              /*
              bday and years employed
  
              */
              //if($('#dob_day').val() != 'day' &amp;&amp; $('#dob_month').val() != 'month' &amp;&amp; $('#dob_year').val() != 'year' &amp;&amp; $('#employed_month').val() != 'month' &amp;&amp; $('#employed_year').val() != 'year')
              //{
                  $('div#form').slideToggle('slow');
                  $('#sending').slideToggle('slow');
                  saveform();
              //}        
          }
      });
  </code></pre>