Good afternoon all,
Quick question.. I have the following Javascript in some code I am
writing. The purpose of the code is to open a child window with
dimensions based on a graphic image. The problem I am having is that
when you click on the link the first time, winImage.width is coming up
as 0. If you close the window and click the link a second time the
function is reading the width of the image correctly.
Any help would be very much appreciated:
<FUNCTION SNIPET>
function image_viewer(url,image) {
var winImage
var winW
winImage = new Image()
winImage.src = image
if (winImage.width < "250") {
winW = "250";
} else {
winW = winImage.width;
}
var winH = winImage.height + 80
<HYPERLINK>
"<A OnClick = " & vbQuote & "javascript: image_viewer(" & vbSquote &
strBase & "functions/image_viewer.asp?style_id=" & Request("style_id") &
"&mod=" & Request("mod") & "&imgCode=s1" & vbSQuote & "," & vbSQuote &
strBase & "products/" & catcode & "/" & styThumbnail & vbSQuote & ")" &
vbQuote & >Norwegian Clogs</A> "
Regards,
Eric