<?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 Re: Issues adding a hyperlink to resultGraphic in popupTemplate in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-adding-a-hyperlink-to-resultgraphic-in/m-p/1278549#M80868</link>
    <description>&lt;P&gt;Here are some snippets of the relevant pieces of code:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="this is within a large for loop, so all the links in this array is set to this" style="width: 367px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/67970i071065BFB49CCA24/image-size/large?v=v2&amp;amp;px=999" role="button" title="array example.PNG" alt="this is within a large for loop, so all the links in this array is set to this" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;this is within a large for loop, so all the links in this array is set to this&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="showresult example.PNG" style="width: 339px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/67971iF48B9A2B44A7CFF2/image-size/large?v=v2&amp;amp;px=999" role="button" title="showresult example.PNG" alt="showresult example.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="what the popup looks like" style="width: 282px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/67972iB6D5EE01DB7590D3/image-size/large?v=v2&amp;amp;px=999" role="button" title="popup.PNG" alt="what the popup looks like" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;what the popup looks like&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="what it looks like in console" style="width: 163px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/67973i86EB39B2510778BA/image-size/large?v=v2&amp;amp;px=999" role="button" title="console.PNG" alt="what it looks like in console" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;what it looks like in console&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Apr 2023 20:55:16 GMT</pubDate>
    <dc:creator>TristanG</dc:creator>
    <dc:date>2023-04-13T20:55:16Z</dc:date>
    <item>
      <title>Issues adding a hyperlink to resultGraphic in popupTemplate</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-adding-a-hyperlink-to-resultgraphic-in/m-p/1278489#M80866</link>
      <description>&lt;P&gt;I have 2 arrays of &amp;lt;a&amp;gt; tags, one has an href attribute, and the other has an onclick attribute. When the &amp;lt;a&amp;gt; arrays are carried into the popupTemplate, it always clears all the attributes but keeps the text within &amp;lt;a&amp;gt;&amp;lt;/a&amp;gt;, rendering the link unusable or incorrect.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2023 19:26:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-adding-a-hyperlink-to-resultgraphic-in/m-p/1278489#M80866</guid>
      <dc:creator>TristanG</dc:creator>
      <dc:date>2023-04-13T19:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: Issues adding a hyperlink to resultGraphic in popupTemplate</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-adding-a-hyperlink-to-resultgraphic-in/m-p/1278509#M80867</link>
      <description>&lt;P&gt;Can you post your code?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2023 19:59:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-adding-a-hyperlink-to-resultgraphic-in/m-p/1278509#M80867</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2023-04-13T19:59:51Z</dc:date>
    </item>
    <item>
      <title>Re: Issues adding a hyperlink to resultGraphic in popupTemplate</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-adding-a-hyperlink-to-resultgraphic-in/m-p/1278549#M80868</link>
      <description>&lt;P&gt;Here are some snippets of the relevant pieces of code:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="this is within a large for loop, so all the links in this array is set to this" style="width: 367px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/67970i071065BFB49CCA24/image-size/large?v=v2&amp;amp;px=999" role="button" title="array example.PNG" alt="this is within a large for loop, so all the links in this array is set to this" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;this is within a large for loop, so all the links in this array is set to this&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="showresult example.PNG" style="width: 339px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/67971iF48B9A2B44A7CFF2/image-size/large?v=v2&amp;amp;px=999" role="button" title="showresult example.PNG" alt="showresult example.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="what the popup looks like" style="width: 282px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/67972iB6D5EE01DB7590D3/image-size/large?v=v2&amp;amp;px=999" role="button" title="popup.PNG" alt="what the popup looks like" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;what the popup looks like&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="what it looks like in console" style="width: 163px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/67973i86EB39B2510778BA/image-size/large?v=v2&amp;amp;px=999" role="button" title="console.PNG" alt="what it looks like in console" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;what it looks like in console&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2023 20:55:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-adding-a-hyperlink-to-resultgraphic-in/m-p/1278549#M80868</guid>
      <dc:creator>TristanG</dc:creator>
      <dc:date>2023-04-13T20:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: Issues adding a hyperlink to resultGraphic in popupTemplate</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-adding-a-hyperlink-to-resultgraphic-in/m-p/1278568#M80869</link>
      <description>&lt;P&gt;What are you expecting when someone clicks on "Test"? If it's opening up another site, then this works (using this &lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=intro-graphics" target="_self"&gt;sample&lt;/A&gt;)&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var linkArray = [
  "&amp;lt;a href='http://google.com'&amp;gt;Test&amp;lt;/a&amp;gt;",
]
const polylineGraphic = new Graphic({
  geometry: polyline,
  symbol: lineSymbol,
  attributes: lineAtt,
  popupTemplate: {
  // autocasts as new PopupTemplate()
    title: "{Name}",
    content: linkArray[0]
  }
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="popup3.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/67978i37523C377FB1CF7A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="popup3.png" alt="popup3.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2023 21:31:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-adding-a-hyperlink-to-resultgraphic-in/m-p/1278568#M80869</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2023-04-13T21:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: Issues adding a hyperlink to resultGraphic in popupTemplate</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-adding-a-hyperlink-to-resultgraphic-in/m-p/1278575#M80870</link>
      <description>&lt;P&gt;So the links I am grabbing from an underlying webpage, has links that look like(which is supposed to get copy and pasted into the popupbox):&lt;/P&gt;&lt;P&gt;&amp;lt;a href='' onclick='alert()'&amp;gt;Test&amp;lt;/a&amp;gt;&lt;/P&gt;&lt;P&gt;^This one is supposed to open an alert() dialogue box in the browser.&lt;/P&gt;&lt;P&gt;&amp;lt;a href='javascript&amp;amp;colon;linkTest();'&amp;gt;Test&amp;lt;/a&amp;gt; (&amp;amp;colon; is supposed to just be a normal colon but the forum is changing it to &amp;amp;colon;)&lt;/P&gt;&lt;P&gt;^This one is supposed to bring a user to a new website using a javascript function, as it returns a link that is dynamically generated&lt;/P&gt;&lt;P&gt;The main issue that I am having, is that it seems to remove all of the attributes, if it isn't a normal link like what you did above.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2023 21:54:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-adding-a-hyperlink-to-resultgraphic-in/m-p/1278575#M80870</guid>
      <dc:creator>TristanG</dc:creator>
      <dc:date>2023-04-13T21:54:39Z</dc:date>
    </item>
    <item>
      <title>Re: Issues adding a hyperlink to resultGraphic in popupTemplate</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-adding-a-hyperlink-to-resultgraphic-in/m-p/1278578#M80871</link>
      <description>&lt;P&gt;by what I mean by "copy and pasted", I grabbed all the links and stored them into an array, to be displayed into the popupBox&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2023 21:49:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-adding-a-hyperlink-to-resultgraphic-in/m-p/1278578#M80871</guid>
      <dc:creator>TristanG</dc:creator>
      <dc:date>2023-04-13T21:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: Issues adding a hyperlink to resultGraphic in popupTemplate</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-adding-a-hyperlink-to-resultgraphic-in/m-p/1278605#M80872</link>
      <description>&lt;P&gt;Have you seen &lt;A href="https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-pop-up-onclick-is-not-rendering/m-p/1252966" target="_self"&gt;this thread&lt;/A&gt;? You'll find various proposed solutions to this kind of problem there.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2023 23:09:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-adding-a-hyperlink-to-resultgraphic-in/m-p/1278605#M80872</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2023-04-13T23:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: Issues adding a hyperlink to resultGraphic in popupTemplate</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-adding-a-hyperlink-to-resultgraphic-in/m-p/1278630#M80874</link>
      <description>&lt;P&gt;Thanks for the pointer! I swear I was looking everywhere up and down, but I just wasn't using the right phrasing. This immediately helped!&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2023 03:31:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-adding-a-hyperlink-to-resultgraphic-in/m-p/1278630#M80874</guid>
      <dc:creator>TristanG</dc:creator>
      <dc:date>2023-04-14T03:31:26Z</dc:date>
    </item>
  </channel>
</rss>

