Find the ID of the window which generates alerts
<p>Is there a way to find out the id of the IE window that generates alert boxes?  I assume it is the document or window itself.</p>

<p>Either simple html or jQuery can be used.</p>

<p>I tried something like:</p>

<pre><code>var id = $(this).parent().attr('id');
</code></pre>

<p>but to no avail.</p>

<p>Ultimately I want to find out the ID of the window/document which generates javascript alerts so I can override it.</p>

<p>Thanks.</p>
