Forum Moderators: open
I am a little stuck as to how to open a new window & refresh the parent window using javascript.
1. User clicks link which opens a new window
2. Upon clicking the link the parent window is refreshed.
3. The user is able to click a link in the window that opened (close window)
I have tried using this to refresh the window in the page that opens:
<a href=\"javascript:top.close();top.opener.location.reload();\" class=headings title='continue shopping'>Continue Shopping</A> And this to open the window:
target='new'> Apart from not refreshing as soon as the window is opened (obviously), I have received warnings from the browser saying that the webpage is tryign to close the window.
Can anyone possibly help with this?
<a href="/page2.html" target="_blank" >To Page 2</a>
on page 2, when it loads refresh page 1.
<body onload="top.opener.document.location.reload();" >
also on page 2, to close window.
<a href="javascript:top.close()" class="headings" title="continue shopping">Continue Shopping</a>