javascript popup reloads parent page -
Posted
by harry_T
on Stack Overflow
See other posts from Stack Overflow
or by harry_T
Published on 2010-04-07T20:55:07Z
Indexed on
2010/04/07
21:03 UTC
Read the original article
Hit count: 212
I have a popup function in a program that works well, be re-loads the parent page as it loads the child. Is there a way to prevent this behaviour.
// popup window function
function newPop(url, myWin, width, height, left, top, scrollbars) {
parms = 'toolbar=yes, scrollbars=no, location=no, menubar=no, resizable=no, width= ' + width + ' , height=' + height + ' , left= ' + left + ' , top= ' + top + ' , titlebar=no , scrollbars = ' + scrollbars ;
var newwin = window.open(url,myWin, parms);
newwin.resizeTo(width,height);
newwin.moveTo(0,0);
newwin.moveTo(left,top);
newwin.focus();
return false;
}
© Stack Overflow or respective owner