D
dredge
Hi guys- I need a hand with some Javascript concatenation syntax.
Here's the code:
var current_image_name = this.divImageName
window.alert(document.+current_image_name+.src)
My goal is to have the alert display the url of the document.
[current_image_name].src item (ex: www.mysite.com/images/image1.jpg )
and not the string that points to the item (ex: document.image1.src).
Hopefully this makes sense.
I am just not sure how to concatenate the current_image_name variable
into the window.alert line. The window.alert code above does not work.
Here's the code:
var current_image_name = this.divImageName
window.alert(document.+current_image_name+.src)
My goal is to have the alert display the url of the document.
[current_image_name].src item (ex: www.mysite.com/images/image1.jpg )
and not the string that points to the item (ex: document.image1.src).
Hopefully this makes sense.
I am just not sure how to concatenate the current_image_name variable
into the window.alert line. The window.alert code above does not work.