javascript open parent window from NewForm.aspx
<p>I have the following javascript in the NewForm.aspx. It works but opens the link in the NewForm.apsx. I need to open the link in the parent window where NewForm.aspx was initiated from. What am I doing wrong?</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.close(); window.location = "http://www.google.com"; };
        }
   }
}

redirect();
&lt;/script&gt;
</code></pre>
