The question was fairly descriptive but I\'ll describe it further.
Basically, I have window1
. Clicking a button link opens window2
. Clickin
Update: This hasn't worked since Chrome (21+). The workaround is to close/reopen.
opener.focus()
does work. If it doesn't for you, we'll need a test case.
Some things that might cause problems: calling it in an event handler that fires before the button's window gets focus due to the click (but I don't think that'd usually be the case); running it on a browser that stuffs pop-ups into browser tabs instead.
(I agree with Max's comment. Pop-ups with cross-window scripting are generally best avoided.)