whenever I use the page that references this code it gives me an error on page message "object expected".
If I comment out try..catch then it works fine.
Even with nothing in the try..catch it has the same problem.
I am sadly confused!
function displayImage(url, windowName)
{
popupWin = window.open( url, windowName, 'width=200,height=200,scrollbars=no,maximize=no,minimize=no,resizable,dependent=yes' );
hgt = popupWin.document.images[0].height + 60;
wdt = popupWin.document.images[0].width + 30;
try
{
} catch (e)
{
if e="Error" alert("Error thrown"
;
}
popupWin.window.resizeTo(wdt, hgt);
}
If I comment out try..catch then it works fine.
Even with nothing in the try..catch it has the same problem.
I am sadly confused!
function displayImage(url, windowName)
{
popupWin = window.open( url, windowName, 'width=200,height=200,scrollbars=no,maximize=no,minimize=no,resizable,dependent=yes' );
hgt = popupWin.document.images[0].height + 60;
wdt = popupWin.document.images[0].width + 30;
try
{
} catch (e)
{
if e="Error" alert("Error thrown"
}
popupWin.window.resizeTo(wdt, hgt);
}