[?] Close popup window, then reopen with new dimensions

wxdqz

New Member
Hi there,

I'm trying to use a popup window to display images of different dimensions. I had limited success wih resizeTo because it includes chrome in its dimension values. After multiple trials, it seems like closing the window and reopening it with the new dimensions and image is my best bet.
var viewer;

function closeViewer() { if (viewer && !viewer.closed) { viewer.close(); } }

function openViewer(itemName,itemClass,itemTitle,winWidth,winHeight,winScroll) {
closeViewer();
urlString = 'viewer.php?name=' + itemName + '&class=' + itemClass + '&title=' + itemTitle;
featureString = 'width=' + winWidth + ',height=' + winHeight + ',scrollbars=' + winScroll;
viewer = window.open(urlString,'viewer',featureString);
}
I need closeViewer() as a seperate function because it runs onUnload in the parent (to close the popup when the site is closed). The code works in ie6. However, Safari (Konqueror based) closes the popup window without reopening with the new image and dimensions. Any suggestions?

TIA,
Dan
 
Top