I’m trying to pass a dynamically generated URL from one JavaScript, into my HTML page, so that another JavaScript can pick it up and use it.
Specifically, the first JavaScript file that generates the URL is:
[CODE]
function currentimglg() {
imagelg = “http://www.katherinellannin.com/images/pile_project/Pile_Project_” + x +”_lg.jpg”;
document.largeimg.href=imagelg;
}
In my HTML page, I have the following code:
[CODE]<a href=”javascript:currentimglg();” name=”largeimg” target=’_blank’ onClick=’openit(this.href, “Pile Project”); return false’><img src=”javascript:void(currentimg();)” border=”0″ name=”gallery” /></a>
Finally, a second JavaScript file called openit should be useing the URL created by currentimglg in ‘openit(this.href, (above).
In case you need that JS file, it’s available here: [url]http://gil.davis.home.att.net/openit_example.htm
But my issue is that the image URL isn’t printing into my HTML document. How do I get it to do that? document.write doesn’t work either (though I may have had the syntax wrong).
Thanks for your help!