onClick =
"n_name = window.open('page.html','','height=640,width=895,t op='+
Math.round((screen.height-640)/2)+',left='+Math.round((screen.width-895)/2))"
Very crude, though. Especially if screen size is less than 895x640 (very
possible), top and left will be negative(not good).
If you are interested, I will show you how to check for these possibilities.
MIck
seb wrote:
Quote:
Hi all,
I'm opening popup windows with the following script:
onClick =
'javascript:n_name=window.open('page.html','','hei ght=640,width=895,scrollbars=no,toolbar=no,menubar =no');void(0);")'
I want to center the popups, and I know how to do it with an onLoad
script I would place in the the popup page. But is there a way to place
the script within the onclick event (within the above script) rather
than in the popup html?
Thanks |