Size of popup windows in Netscape and Opera

  Teasle 17:33 29 Jan 07
Locked

I am having difficulty finding a code that allows me to set the size and position of popup windows in Netscape and Opera browsers. Can anyone help?
Thanking you in anticipation.

  Gingermum 19:27 02 Mar 07

Here's some script I used on one of my sites. It opens another window in the centre. You should embed it in the head of the document of in a separate js file:
function newWindows(the_URL,ww,wh)
{
var width = window.screen.availWidth;
var height = window.screen.availHeight;
var left_point = parseInt((width)/2) - parseInt(ww/2);
var top_point = parseInt(height/2) - parseInt(wh/2);
var the_size = "height=" + wh + ",width=" + ww + ",top=" + top_point + ",left=" + left_point;
window.open(the_URL,"",the_size);
}
In the file I used the following html to call on the function:
<p>Click <a href="#" onClick="newWindows('dinner.htm',500,500);" title="This will open the menu in a new window."> here</a> for more details.</p>
You can see it at click here

This thread is now locked and can not be replied to.

Sony Xperia XZ Premium review: Hands-on with the new 4K HDR phone with Motion Eye camera and Snapdr5…

1995-2015: How technology has changed the world in 20 years

Best laptop for design and art 2017: we test Apple, Dell, HP, Lenovo and Microsoft's best models…

CarPlay tips & troubleshooting guide: CarPlay tips & troubleshooting guide: Get the most from…