title: Redirect iframe after form submit
body: <p>I have created an asp page that contains an iframe.
  the iframe contains a form, on form submit I want to redirect the iframe to another page.</p>
  
  <p>I have tried this method:</p>
  
  <pre><code>//iframe content:
   &lt;html&gt;
    &lt;head&gt;
      &lt;script type="text/javascript"&gt; 
         function onformsubmit()
         {
          setTimeout(function ()
          {
              $(top.document).find('#page').attr('src', 'page2.aspx');
          },1000);
         }
     &lt;/script&gt;     
   &lt;/head&gt;
   &lt;body&gt;
       &lt;form id="form1" runat="server" onsubmit="onformsubmit()"&gt;
        ...
        &lt;div class="menubar"&gt;
              &lt;asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True"  CommandName="Update" Text="Update" /&gt;
              &amp;nbsp;
              &lt;asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" /&gt;
          &lt;/div&gt;
         ...
       &lt;/form&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>but unfortunately it does not work.
  I'm using visual basic serverside; clientside i'm using javascript.</p>