title: Why is my onbeforeunload handler causing an "Unspecified error" error?
body: <p>I am using the following JavaScript function within IE6:</p>
  
  <pre><code>window.onbeforeunload = function() {  
    if (itemChanged) {  
       return 'You have made changes to data on this page.  If you navigate away from this page without first saving your data, the changes will be lost.';  
    }  
  };  
  </code></pre>
  
  <p>But when I press the Cancel button on the dialog, I am getting a JavaScript page error:</p>
  
  <blockquote>
    <p>Error: Unspecified error.</p>
  </blockquote>
  
  <p>Any ideas?</p>