Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why no popup position?>

Status
Not open for further replies.

gameon

Programmer
Feb 23, 2001
325
GB
Hi, can anyone tell me why my function always opens the window at the top left of the screen?

function PopDetails(theWidth,theHeight,theURL){
windowprops = "width="+theWidth+",height="+theHeight+",location=no,menubar=no,personalbar=no,resizable=no,screenX=0,screenY=0,locationbar=no,scrollbars=no,directories=no,statusbar=no,toolbar=no";
FullDetailWin = window.open(theURL,'FullDetailWin', windowprops);
FullDetailWin.focus();
}

M@)
 
I know I've left 0 and 0 for the positions. The current function is:

function PopDetails(theWidth,theHeight,theURL){
windowprops = "width="+theWidth+",height="+theHeight+",location=no,menubar=no,personalbar=no,resizable=no,screenX=300,screenY=300,locationbar=no,scrollbars=no,directories=no,statusbar=no,toolbar=no";
FullDetailWin = window.open(theURL,'FullDetailWin', windowprops);
FullDetailWin.focus();
}
 
"screenX" and "screenY" are NS only

if you're trying to open it at 300,300 then include "top=300,left=300" to cover IE too

windowprops = "width="+theWidth+", height="+theHeight+", location=no, menubar=no, personalbar=no, resizable=no, top=300, left=300, screenX=300, screenY=300, locationbar=no, scrollbars=no, directories=no, statusbar=no, toolbar=no";

=========================================================
try { succeed(); } catch(E) { tryAgain(); }
-jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top