PDA

View Full Version : JS onLoad open window at specific coordinates


artslave
09-18-2002, 04:16 AM
Hi all, long time no see.

I've got a javascript question.

I'm using Dreamweaver and I've got the pop-up window thingamajig working but I would like to be able to tell the window specific location on the screen to open. For example I'd like an independent navigation window to be 200 pixels wide and open in the top left corner (x=0 y=0) and a content window 200+ pixels to the right of the top left corner (x=200 y=0).

Any help or a nudge in the right directions would be appreciated :)


<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>

<BODY OnLoad="MM_openBrWindow('http://artslavestudio.com','navigation','scrollbars=yes,resizable=yes,width=200,height=750')">



PS: I like the new look! 8)

nex
09-18-2002, 04:23 PM
I think the "right" way to do it is to specify a top and left, and a screenX and screenY (top/left being the MS way, screenX/screenY being the NS way)

but note that not everyone has the top of their screen clear, and several people use mozilla and disallow unrequested popup windows. not to mention how many more people use tools which unconditionally zap any popup.

artslave
09-26-2002, 02:02 AM
Thanks for the tips nex,
I talked the client out having the navigation bar in its own window.