Click to See Complete Forum and Search --> : Links with javascript


bicepsa
01-12-2003, 12:32 PM
First sorry for my English.
I have webpage. I want to open new window with one link (example:
<a href="newpage.html" target="_new">page2</a>. So we have now two windows (first and second).
I want in the new page (newpage.html) to put a javascript, who to open
auto new page in the first window. Is this possible?
Best regards from Iskren

khalidali63
01-12-2003, 12:45 PM
yes you can do that.
put the following code in the body section of the "newpage.html"


<script>
top.opener.document.location.href="http://www.cnn.com";
</script>