antipop
08-09-2002, 12:59 PM
I'm trying to insert some code which will centre the current window on the screen. At the moment, I'm using a script which repositions a window of a set size, which works fine. However, now I need to centre a window which could be any size.
Here's the code I'm using:
var grosse_width = screen.availWidth / 2;
var grosse_height = screen.availHeight / 2;
window.moveTo(grosse_width - 395,grosse_height - 250);
Is there a way of replacing the width value 395 and the height value 250 with code representing the size of the currend window? It would need to be self / 2 or something I suppose...
Thanks in advance,
Andrew
Here's the code I'm using:
var grosse_width = screen.availWidth / 2;
var grosse_height = screen.availHeight / 2;
window.moveTo(grosse_width - 395,grosse_height - 250);
Is there a way of replacing the width value 395 and the height value 250 with code representing the size of the currend window? It would need to be self / 2 or something I suppose...
Thanks in advance,
Andrew