title: How to check if iframe fails to load? jquery?
body: <p>I have this jquery code right now and it's working fine. What it does it when a user clicks the submit button, it would hide the form, show the loader, then submit the data to a link and load the output in an iframe. </p>
  
  <pre><code>$(document).ready(function() {
  
  $("#xxx_form").validate({
      submitHandler: function() {
          $('#input_form').hide('slow');
          $('#loader').show('slow');
          form.submit();
      }
  });
  
  $("#xxx_frame").load(function (){
      $('#loader').hide('slow');
      $('#history').show('slow');
      $('#xxx_frame').show('slow');
  });
  </code></pre>
  
  <p>});</p>
  
  <p>This is working fine. What I need is how to check if the iframe loaded fine or not. During my testing their are times when the iframe would timeout or give an error that it can't connect to the server. Due to ISP failure. Now I need to check for this kind of errors, how can I do this?</p>