title: javascript open parent window
body: <p>The following is in the NewForm.aspx which gets executed from a parent page (surveys/lists/testsurvey/allitems.aspx). The javascript works and open google. However, it opens the google in the pop up window (newform.aspx) but i need to close the popup window and show google.com on the parent window (or whatever the parent window link is)</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  function redirect()
  {
    var inputcCtrls = document.getElementsByTagName("input");
    for(m=0; m&lt;inputcCtrls.length; m++)
     {
         if(inputcCtrls[m].type == 'button' &amp;&amp; inputcCtrls[m].value == 'Finish')
          {
                 var funcOnClick = inputcCtrls[m].onclick;
                 inputcCtrls[m].onclick = function () { window.location = "http://www.google.com/" };        }
     }
  }
  
  redirect();
  &lt;/script&gt;
  </code></pre>