Centered popup window

is there anything i can add to this


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

to make the window exactly centered when it pops up?

thanks

-----------------------edit------------------------------------

here’s what i have now


<html>
<head>
<title>aaronsleeper.com</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
centerWidth = (screen.width) ? (screen.width-w)/2 : 0;
centerHeight = (screen.height) ? (screen.height-h)/2 : 0;  
window.open(theURL,winName,features);
}
//-->
</script>
</head>

<body bgcolor="#7A0A08" onLoad="MM_openBrWindow('flashSite.html','aaronsleeper','width=640,height=480,top='+centerHeight+',left='+centerWidth+'')">
</body>
</html>

but it’s not working

hey shuga =)

did you read my reply in your past thread about popups? :-\

if it’s still the same question … check the attachment :slight_smile:

[size=1]credit. popup window code by lostinbeta ;)[/size]

thanks! =)

I see you like my script Kax… YAY :beam:

no problem :smirk:

[size=1]ps. you didn’t read it … did you? :P[/size]

[size=1]edit.[/size]
actually yes. i like it =)

i can’t make it work

http://www.aaronsleeper.com/base.html

what’s wrong with the code there?

the name is correct for the file i want to open (flashSite.html) and i set the dimensions to 640x480 … i’m not sure what i copied wrong :frowning:

come on shuga !! :stuck_out_tongue: it’s so obvious …

your problem is that i have no idea what your problem is :-\

where are you lostinbeta !!? :hair: :stuck_out_tongue:

come on shuga !! it’s so obvious …

:stuck_out_tongue:

it works
thank you so much
www.aaronsleeper.com/base.html

what did you do?

i looked at the code … but i don’t understand

and what’s with the symerror function?

<body ... ml','aaronsleeper.com',640,480,'no','no');">
<body ... ml','aaronsleepercom',640,480,'no','no');">

can you see the difference?

and what’s with the symerror function?

lol :stuck_out_tongue: :stuck_out_tongue: … stupid me :trout:

Congrats :stuck_out_tongue:

I see your design is improving slightly each time I see this layout. Good Job, I like it.

A few suggestions about this pop-up.

People with pop-up stoppers will never see your site because it prevents the pop-up from happening. My suggestion is that on your MAIN window (the window that launches your pop-up) you should include 2 links. 1 to open up in normal mode (so people with pop-up stoppers can see it, and pop-ups can be annoying), and another to open it in a pop-up.

Just a suggestion :love: