How to embed an attribute value in a hyperlink within infoWindow/content/href

Discussion created by wsyoung on Feb 10, 2011
Latest reply on Mar 1, 2012 by DSwingley-esristaff
I am very new to ArcGIS API for JavaScript so bare with me.

I would like to use a value from an attribute such as a "name" to reference a text
file within the content of an infoWindow such as:

<a href=""> Name: " + attrs.Name + ".txt</a>"

mainlink = ""
end_of_link = attrs.Name + "/" + attrs.Name + ".txt"
link = mainlink + end_of_link

and the variable "link" is substituted above for "".

Can someone help me with the syntax in the above reference using the link variable?