PDA

View Full Version : popup window centered in the browser window?


cris.r
11-20-2004, 12:25 AM
hi > what do i have to add to the following code to make my popup window pop up centered in the browser window????


this is from a tutorial by Jesse

1. Insert the base Javascript code into your HTML code between the HEAD tags (<head> Script goes here </head>). Copy and paste the script below:

<script language="JavaScript">
<!--
function spawnWindow(URL,Name,features) {
window.open(URL,Name,features);
}
//-->
</script>


2. Add code to your flash button in the following form:

on (release) {
getURL ("javascript:
spawnWindow('xxx.swf','name','toolbar=no,location= yes,status=no,menubar=no,scrollbars=no,resizable=n o,width=300,height=200')


thank you for any hint

cris

Cota
11-20-2004, 04:32 AM
In your features area, just add this

screenX=400,screenY=400,top=400,left=400

Obviously change the numbers depending on where you need it.

*edit*
Note that ScreenX and ScreenY are for Netscape and Top and Left are for IE.