[Javascript] Quick question on passing reference to url

Nathan V. Patwardhan nvp at noopy.org
Wed Nov 29 12:37:39 CST 2006


On Thu, Nov 30, 2006 at 05:30:41AM +1100, David Chance wrote:
: 
: What I'm looking to do is basically just have an image
: displayed, then when clicking on it a new window opens that I
: can size and include a close link in it.
[snip]

:   generator.document.write('<A HREF="javascript:ImageWindow(ImgUrl)"><IMG SRC='ImgUrl' width="300">');

Maybe what you'd meant was (untested):

    generator.document.write('<A HREF="javascript:ImageWindow(ImgUrl)"><IMG SRC="' + ImgUrl + '" width="300">');

Make sure that ImgUrl is in the scope that you'd expect, too.

-- 
Nathan V. Patwardhan
nvp at noopy.org



More information about the Javascript mailing list