<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Set hyperlink in InfoTemplate by field in attribute table in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-hyperlink-in-infotemplate-by-field-in/m-p/32660#M2635</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a field in my attribute table that contains a link to a web page. In Flex, I was able to create a hyperlink using this field to populate the appropriate place in my popup. I'd like to do the same now with JavaScript.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the InfoTemplate set up and it looks perfect. However, when I click on the link, a new browser page is opened, but it does not go to the link contained in my attribute table. Instead, it is opening a new page of the project I'm working on. How do I need to rewrite the href section of this code for the link to work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var stateParksInfoTemplate = new InfoTemplate();&lt;BR /&gt;stateParksInfoTemplate.setTitle("&amp;lt;b&amp;gt;${NAME}&amp;lt;/b&amp;gt;");&lt;/P&gt;&lt;P&gt;var stateParksInfoContent =&lt;BR /&gt; "&amp;lt;div class=\"InfoContent\"&amp;gt;" +&lt;BR /&gt; "For more information on &amp;lt;b&amp;gt;${NAME}&amp;lt;/b&amp;gt;, please &amp;lt;a href='${LINK}' target='_blank'&amp;gt;&amp;lt;font color='0x84CCDA'&amp;gt;click here&amp;lt;/font&amp;gt;&amp;lt;/a&amp;gt;."&lt;BR /&gt; + "&amp;lt;/div&amp;gt;";&lt;BR /&gt; &lt;BR /&gt;stateParksInfoTemplate.setContent(stateParksInfoContent);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Aug 2015 18:39:52 GMT</pubDate>
    <dc:creator>AshleyPeters</dc:creator>
    <dc:date>2015-08-12T18:39:52Z</dc:date>
    <item>
      <title>Set hyperlink in InfoTemplate by field in attribute table</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-hyperlink-in-infotemplate-by-field-in/m-p/32660#M2635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a field in my attribute table that contains a link to a web page. In Flex, I was able to create a hyperlink using this field to populate the appropriate place in my popup. I'd like to do the same now with JavaScript.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the InfoTemplate set up and it looks perfect. However, when I click on the link, a new browser page is opened, but it does not go to the link contained in my attribute table. Instead, it is opening a new page of the project I'm working on. How do I need to rewrite the href section of this code for the link to work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var stateParksInfoTemplate = new InfoTemplate();&lt;BR /&gt;stateParksInfoTemplate.setTitle("&amp;lt;b&amp;gt;${NAME}&amp;lt;/b&amp;gt;");&lt;/P&gt;&lt;P&gt;var stateParksInfoContent =&lt;BR /&gt; "&amp;lt;div class=\"InfoContent\"&amp;gt;" +&lt;BR /&gt; "For more information on &amp;lt;b&amp;gt;${NAME}&amp;lt;/b&amp;gt;, please &amp;lt;a href='${LINK}' target='_blank'&amp;gt;&amp;lt;font color='0x84CCDA'&amp;gt;click here&amp;lt;/font&amp;gt;&amp;lt;/a&amp;gt;."&lt;BR /&gt; + "&amp;lt;/div&amp;gt;";&lt;BR /&gt; &lt;BR /&gt;stateParksInfoTemplate.setContent(stateParksInfoContent);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 18:39:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-hyperlink-in-infotemplate-by-field-in/m-p/32660#M2635</guid>
      <dc:creator>AshleyPeters</dc:creator>
      <dc:date>2015-08-12T18:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: Set hyperlink in InfoTemplate by field in attribute table</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-hyperlink-in-infotemplate-by-field-in/m-p/32661#M2636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ashley,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This came-up a few times in the past - it seems to be a common question! I had issues with links myself before... Have a look at the following threads - they may have some info to help you:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/thread/162144"&gt;additional function in infotemplate hyperlink&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/thread/159205"&gt;InfoWindow fields - URLs automatically add "_blank" as target&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 19:10:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-hyperlink-in-infotemplate-by-field-in/m-p/32661#M2636</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2015-08-12T19:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: Set hyperlink in InfoTemplate by field in attribute table</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-hyperlink-in-infotemplate-by-field-in/m-p/32662#M2637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Chris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've got it working now. I had a capitalization issue, LINK should have been Link.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ashley&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 19:15:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-hyperlink-in-infotemplate-by-field-in/m-p/32662#M2637</guid>
      <dc:creator>AshleyPeters</dc:creator>
      <dc:date>2015-08-12T19:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: Set hyperlink in InfoTemplate by field in attribute table</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-hyperlink-in-infotemplate-by-field-in/m-p/32663#M2638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cool - easy fix!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Aug 2015 19:17:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-hyperlink-in-infotemplate-by-field-in/m-p/32663#M2638</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2015-08-12T19:17:37Z</dc:date>
    </item>
  </channel>
</rss>

