Click to See Complete Forum and Search --> : Parent of Popup


jayke00
05-12-2003, 06:38 PM
Hey,

Im just starting to learn JavaScript and have a simple question. I have a link that opens a popup window. In the popup are various choices for the user. I was wondering if anyone knows how to cause the original window to go to a link clicked by the user in the popup, and also close the popup.

Any help appreciated.

Thanks!

pyro
05-12-2003, 06:45 PM
Sure thing...
<a href="somepage.htm" onclick="window.opener.location.href=this.href; window.close(); return false;">link</a> should do it for you...

jayke00
05-12-2003, 07:05 PM
Perfect!

Thanks :)

pyro
05-12-2003, 07:31 PM
You're welcome!