Select to view content in your preferred language

adding HTML into  function layerTabContent

636
2
07-09-2010 04:32 AM
simonmiles
Emerging Contributor
hi,

I've been trying to add in a url into the following code,(see below) where by the already exisit URL is followed by a unique reference number. This unique reference number 'UPRN' is also contained within the layer.

content+="<tr><td>"+layerResults.features.attributes['UPRN']+"<a href='URL=['UPRN']'>(show)</a></td>";

What i'm struggling with is working out how to add the URL with the 'UPRN' field.

Any ideas?
0 Kudos
2 Replies
derekswingley1
Deactivated User
Spaces are your friend. Are you trying to add URL as a query string parameter? How about:
content += "<tr><td>" + layerResults.features.attributes['UPRN'] + "<a href='http://somedomain.com/page.html?url='" + layerResults.features.attributes['UPRN'] + "'>(show)</a></td>";
0 Kudos
simonmiles
Emerging Contributor
Thanks Swingly.
0 Kudos