[thelist] javascript RE-sizing open pop-up

Ken Wan kwan at tourismwhistler.com
Fri Aug 8 10:51:08 CDT 2003


Okay, I have a question for you folks. This is my first post so please be
patient. I have a website where I use javascript pop-up windows to display
images in a gallery. The pop-up is set to not be resizable, no scrollbars
and no browser menu/buttons. However, there are two different sizes of
images...600x400 and 400x600 (landscape and portrait). When you click on a
portrait image and later click on a different portrait image, the new image
loads in the currently opened pop-up. Great! However, if you later click a
landscape image, a new pop-up is required because of the different
dimensions. Does anyone here know if it is possible to use javascript to
resize the pop-up that is already opened? If so, how would you go about
doing this?

Here's the code I use:
function openWindowPlain(url, name, width, height, scrollbars) {
    var x = (screen.availWidth - width) / 2;
    var y = (screen.availHeight - height) / 2;
}
----------------------
Ken Wan


More information about the thelist mailing list