Size of popup windows in Netscape and Opera

  Teasle 17:33 29 Jan 2007
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 2007

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.

Elsewhere on IDG sites

Dell XPS 13 9370 (2018) review

The art of 'British' pulp fiction

Best password managers for Mac

TV & streaming : comment regarder le Tournoi des Six Nations 2018 ?