Updating size of new window

admin

Administrator
Staff member
I've got javascript generating a new window with a full-size image whenever a user clicks on an image thumbnail. The first click works fine, but subsequent clicks don't regenerate the window with the new size settings for the new image. The relevant part of the code looks like this:

function pictureWindow(img_name,width,height) {
newWindow = window.open("", "newWin", "toolbar=no,status=no,location=no,scrollbars=no,title=no,menubar=no,resizable=no,width=" + width + ",height=" + height + "");
}

Each thumbnail sends the appropriate img_name, width and height settings. How do I get the window to "reset" so it uses the new width and height rather than the existing ones?

ThankS!
 
Back
Top