How to redirect parent page using javascript
<p>I want to ask you how to redirect parent page to a certain url from a pup up page? I tried several options as <code>parent</code> or <code>opener</code> and nothing is working. Please help me to understand what is wrong.</p>

<p>here is the code i used:</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;script&gt;
  function openWin(){
       myWindow=window.open('','','width=200,height=100');
       myWindow.document.write("&lt;p&gt;This is 'myWindow'&lt;/p&gt; &lt;button onclick=\"window.opener.location.href = ='http://www.google.com'; window.close();\"&gt;refresh&lt;/button&gt;");
       myWindow.focus();
  }
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;

   &lt;input type="button" value="Open window" onclick="openWin()" /&gt;

 &lt;/body&gt;
 &lt;/html&gt;
</code></pre>
