PDA

Click to See Complete Forum and Search --> : Specify Popup LEFT And TOP window Position


monie
Aug 24th, 2004, 08:30 PM
<SCRIPT language="JavaScript">
<!-- Hide the script from old browsers --
function surfto(form) {
var myindex=form.dest.selectedIndex
window.open(form.dest.options[myindex].value,"main","height=500,width=500,location=no," + "scrollbars=no,menubars=no,toolbars=no,resizable=yes");
}
//-->
</SCRIPT>

this is my coding for drop down popup menu...
it only specify the width and the height of my popup window!

ANYONE CAN HELP ME ADD EXTRA LINE INSIDE THE CODE TO SPECIFY THE LEFT AND TOP OF THE POPUP PAGE?
IT LOOKS SOMETHING LIKE THIS...

",left=" + l + ",top=" + t + "

Jop
Aug 25th, 2004, 03:27 PM
You should move the window using moveTo

Untested but it should work:

<SCRIPT language="JavaScript">
<!-- Hide the script from old browsers --
function surfto(form) {
var myindex=form.dest.selectedIndex
myWin = window.open(form.dest.options[myindex].value,"main","height=500,width=500,location=no," + "scrollbars=no,menubars=no,toolbars=no,resizable=yes");
}
myWin.moveTo(x, y)
//-->
</SCRIPT>


Replace the x and y with the coordinates you want your window at.

monie
Aug 25th, 2004, 10:33 PM
WELL...LET ME TRY THAT FIRST! THANX...