Forum Moderators: open

Message Too Old, No Replies

links from within javascript pop-up windows

how can you get a link within a pop-up window to load the page in parent

         

edunne

5:37 pm on Jun 13, 2005 (gmt 0)



hello - I am using javascript pop-up windows and I am looking for a way to make it so that if a user clicks on a link within the pop-up window, the action automatically closes the pop-up window and loads the link into the parent browser window. I think I have seen this before but can't find info on how to do it.

thanks for any help you can give.
--ellen

RonPK

5:51 pm on Jun 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi & welcome to WebmasterWorld!

You can refer to the opening window with window.opener. So your link could basically be something like

<a href="#"  
onClick="window.opener.location = 'someUrlHere.html'; window.close();"
>
click me
</a>