PDA

View Full Version : How to make IMG src dependent on variable



sbressler
02 Dec 2006, 03:21 PM
I am creating a photo gallery, and the src of the images on the gallery view page is dependent on javascript variables. However, when I write <img src="javascript:img(0)"> or the such (where img(0) returns a string representing the url of the image), the image does not load. Is there a better way to do this, or rather a correct way that I am missing?

If you need more clarification to understand my problem, let me know.

Thanks!

-Scott