An hyperlink as attribute in ArcGIS JavaScript 3.23

566
3
07-16-2020 07:08 PM
FranciscoCastillo1
New Contributor III

Hi, I have an application in ArcGIS Javascript 3.23. One of my webservices has a hypertext field displaying an image. But, when the app is running I can´t see the clickable hyperlink. What is missing here? this is the line of the attribute:

  "<b>LIGA_HIDRO:</b>${LIGA_HIDRO}<br/>" +

The attribute is LIGA_HIDRO and it's content are images, but the App doesn't work and only display the address.

Hope you can help me to solve this.

Thank You In Advance.

Greetings!

Tags (1)
0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus

Is the actual string inside that field a url (a string containing http or https)? You can Not have a link with a local path or unc path and use it as a hyperlink directly.

0 Kudos
FranciscoCastillo1
New Contributor III

Thank You Robert, but why? I have an ArcGIS On Line App Reading this webservice and it's working fine with the url as an hypertext field. I mean, we need our users can display that images as they look inside the data. Nevertheless, when I published the app in my website developing it with ArcGIS API 3.23 only we can see the text of the url.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Francisco,

   The JS API will not automatically convert a string that contains http or https to a hyperlink (and I am happy that it doesn't). You will have to manually add the html anchor tags to your code for that field.

0 Kudos