How can I wait for an iframe to reload its contents?
<p>I have an HTML page that uses javascript / jquery to reload the contents of an iframe:</p>

<pre><code>    $('#my-frame').attr("src","someotherpageinthesamedomain");
</code></pre>

<p>What I'd like to happen is to be able to manipulate the HTML of the iframe after it reloads. I tried this:</p>

<pre><code>    $("#my-frame").load(dostuff());
</code></pre>

<p>But that does not wait for the reload -- I'm guessing because the iframe is already loaded with its original content.</p>
