Discussion Locked

Should be simple Javascript, right?

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I've found great examples on this site for complex or tricky Javascript situations, but I'm still stumbling around trying to find a simple solution to a simple problem... Or maybe it's not so simple? Here's the deal:

I have created a main page that, when you click on a link, spawns a popup window. When you click on a link in this new popup window, I want this popup window to close itself, and have the URL open up in the main parent window that initially spawned the popup. Could anyone pleaseshed some light on this simple(?) problem?

Thanks!

2 replies

by jay eckles

When your control (hyperlink/pushbutton) is clicked, you first want to load the URL in the opener window, something like
opener.location.href = 'http://www.yahoo.com' ;
(although I can't remember right off if that's the correct syntax)
And only then close the pop-up:
window.close() ;

This discussion is closed to new replies.