I have a popup window being opened by my application as follows:
function newPopup(url, windowName) {
window.open(url,windowName,'height=768,width=1366,left=10,top=10,titlebar=no,toolbar=no,menubar=no,location=no,directories=no,status=no');
}
<a href="JavaScript:newPopup('lobby.do', 'lobby');">Enter Lobby</a>
Inside that popup window, I want the user to have the ability to move that popup’s window location by clicking a link:
<a href="game.do">New Game</a>
However, when click this link in the popup window, the popup is automatically closed and the redirect does not happen. I’ve tried adding an onClick and using javaScript:window.location, but get the same results. Any idea what could be causing this? I’ve tested in both Chrome and Firefox.
Just set the
targetof the link to the popup’s name.Or save the value returned from
window.openand set its.location.