[thelist] [Javascript] opening and re-sizing to same window

Ben Morrison ben.morrison at dogstardesign.co.uk
Thu Feb 20 08:16:08 CST 2003


I¹m trying to keep my pop up windows nice and tidy (I hate them but that¹s
the design). So basically I make sure that if there is a pop-up open it will
use that window.

I have quicktimes, wmv files and images which open in their own html pop-up.

It all works fine but if I pop up a video page, then pop up a image page
afterwards it appears with scrollbars - using IE 5.2.

[Code]
function windowPop(url,height)
{
if (document.all) {
  x = window.screenLeft + 210;
  y = window.screenTop + -90;
}
else if (document.layers) {
  x = window.screenX + 190;
  y = window.screenY + 0;
}

newwindow=window.open(url,'name','scrollbars=no,width=320,height='+height+',
top='+y+',left='+x);
if (window.focus) {newwindow.focus()}

}
function imagePop(url, widths, heights)
{

newwindow=window.open(url,'name','scrollbars=no,width='+widths+',height='+he
ights+'');
    if (window.focus) {newwindow.focus()}
}
function resize(widths, heights)
{
window.resizeTo(widths,heights);
}
[/code]

Www.dog-e.co.uk/appliedtv/case1.html

Any ideas?
benjer





More information about the thelist mailing list