TeamPhotoshop
Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
Forum Home Latest Posts Search Help Subscribe

help on centering a window

Page: 1 Reply
Feb 23rd 2004#143328 Report
Member since: Feb 23rd 2004
Posts: 8
onClick="window.open('./layout.htm','main','width=700,height=500,top=?,left=?')

i've tried top=50%, top=center

can any one help?
Reply with Quote Reply
Feb 24th 2004#143340 Report
Member since: Apr 20th 2002
Posts: 3000
You'd need to get the screen resolution values via javascript, then do the appropriate math to get the centering corrent.
Reply with Quote Reply
Feb 24th 2004#143346 Report
Member since: Jun 20th 2003
Posts: 1203
No you can set it to do half the available screen width:

[PHP]

Center Window



Hi!


[/PHP]
Reply with Quote Reply
Feb 24th 2004#143353 Report
Member since: Sep 29th 2003
Posts: 1496
http://www.smileycat.com/js_popup.html

Happy friggin birfday. (That came out of no where. :D)
Reply with Quote Reply
Feb 24th 2004#143361 Report
Member since: Feb 23rd 2004
Posts: 8
thanks Telemakhos! that worked perfect!

i took out this code so that your script would do what i wanted it to...
[PHP]// make the window smallish
window.resizeTo(window_height, window_width); [/PHP]

thanks again!
Reply with Quote Reply
Feb 24th 2004#143389 Report
Member since: Jun 20th 2003
Posts: 1203
No problem.
Reply with Quote Reply
Page: 1 Back to top
Please login or register above to post in this forum