I would like to have an onload comand that would open a new window (with specific size and properties) centered on the screen. I’ve done it with a button before, but can’t seem to make it work with the “onload”. Any ideas?
<script language="JavaScript" type="text/JavaScript"> function new_win(new_page, win_width, win_height) { var posLeft= ((screen.width/2)-(win_width/2)); var posTop= ((screen.height/2)-(win_height/2));
@caynadaauthorFeb 05.2003 — #I went wrong by putting the onload command on the first page and then the script that dictates the page position on the second page.
I tried what you sent, it does open a new window but for some reason it is twice the specified width and in the upper right corner. Any ideas?
@pyroFeb 05.2003 — #[i]Originally posted by caynada [/i]
[B]I tried what you sent, it does open a new window but for some reason it is twice the specified width and in the upper right corner. Any ideas? [/B][/QUOTE]No, not really. It is working fine for me in IE6, NN7, and Mozilla 1. What browser are you using?
@caynadaauthorFeb 05.2003 — #I'm using IE 5.2 on a Mac. Thanks a lot for all your help. For some reason I still couldn't get it to work properly. So I'm just going to have it open in the top left, which works fine.