title: how to redirect to a new page using javascript after executing the function inside button click event
body: <p>I have a page which is an aspx page. This is rendering inside an iframe inside the main asp site. Now I have a button say Cancel. </p>
  
  <p>I have to do some cancel processing and then redirect to some other asp page. I cannot use response.redirect with the page name as what its doing is its reloading the redirected site inside my frame so i am getting two headers etc. </p>
  
  <p>I figured out a javascript "javascript:parent.change_parent_url('/home.asp');" when i put the as link eg</p>
  
  <pre><code>&lt;a href="javascript:parent.change_parent_url('/nestedpage/statuspage.asp');"&gt;&lt;u&gt; here&lt;/u&gt; &lt;/a&gt;
  </code></pre>
  
  <p>But my main problem is in the example above it was just a link with nothing else to do other than redirect to main page. So it worked.</p>
  
  <p>But with the button I want to finish some processing before calling the redirect through javascript.</p>
  
  <p>I am confused as to how the flow of events should be. </p>
  
  <p>Would appreciate any inputs or ideas.</p>
  
  <p>Thanks.</p>