<?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: Hyperlink in Popup to open in new window in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/hyperlink-in-popup-to-open-in-new-window/m-p/1541108#M61622</link>
    <description>&lt;P&gt;When you add a text element, click the source &amp;lt;&amp;gt; icon to edit in html. See the tip on this documentation page:&lt;/P&gt;&lt;P&gt;&lt;A href="https://doc.arcgis.com/en/arcgis-online/create-maps/configure-pop-ups-mv.htm#ESRI_SECTION1_B7B559DA30964877909B95706627B007" target="_blank"&gt;https://doc.arcgis.com/en/arcgis-online/create-maps/configure-pop-ups-mv.htm#ESRI_SECTION1_B7B559DA30964877909B95706627B007&lt;/A&gt;&lt;/P&gt;&lt;P&gt;However this actually won't work the way you want it to, ever.&lt;/P&gt;&lt;P&gt;&lt;A href="https://doc.arcgis.com/en/arcgis-online/reference/supported-html.htm" target="_blank"&gt;https://doc.arcgis.com/en/arcgis-online/reference/supported-html.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;When an a tag is used, the href target URL always opens in a new browser tab.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I thought it might be enforced by end users browser's but it looks like this is also enforced by ArcGIS.&lt;/P&gt;</description>
    <pubDate>Sat, 21 Sep 2024 00:17:51 GMT</pubDate>
    <dc:creator>ChristopherCounsell</dc:creator>
    <dc:date>2024-09-21T00:17:51Z</dc:date>
    <item>
      <title>Hyperlink in Popup to open in new window</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/hyperlink-in-popup-to-open-in-new-window/m-p/1541085#M61619</link>
      <description>&lt;P&gt;I have some Webmaps with custom popups that contain hyperlinks, some of which should display information that is relevant to doing other things in the map - but these popups always open the link in another tab. I hate tabs for the simple reason that I can only see one at a time, thus hiding the map. This is simple enough to do in HTML, but how do you do this in an Arcade expression?&lt;/P&gt;</description>
      <pubDate>Fri, 20 Sep 2024 21:54:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/hyperlink-in-popup-to-open-in-new-window/m-p/1541085#M61619</guid>
      <dc:creator>Pukawai</dc:creator>
      <dc:date>2024-09-20T21:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: Hyperlink in Popup to open in new window</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/hyperlink-in-popup-to-open-in-new-window/m-p/1541087#M61620</link>
      <description>&lt;P&gt;You can return html within a popup. Add a text or arcade section your popup and then:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Text (use the &amp;lt;&amp;gt; when configuring to open html editor)&lt;/LI&gt;&lt;LI&gt;Text (add {expression/expr0} referencing the arcade expression returning html)&lt;/LI&gt;&lt;LI&gt;Arcade (configure the expression to return html)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Here's an example arcade snipped that could be used:&lt;/P&gt;&lt;P&gt;var url = $feature["URL_Field"];&lt;BR /&gt;return "&amp;lt;a href='" + url + "' target='_blank' onclick=\"window.open(this.href, 'newwindow', 'width=800,height=600'); return false;\"&amp;gt;Open link&amp;lt;/a&amp;gt;";&lt;/P&gt;</description>
      <pubDate>Fri, 20 Sep 2024 22:18:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/hyperlink-in-popup-to-open-in-new-window/m-p/1541087#M61620</guid>
      <dc:creator>ChristopherCounsell</dc:creator>
      <dc:date>2024-09-20T22:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: Hyperlink in Popup to open in new window</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/hyperlink-in-popup-to-open-in-new-window/m-p/1541101#M61621</link>
      <description>&lt;P&gt;Genius! Thank you for the reply. I must be missing something though:&lt;/P&gt;&lt;P&gt;When I put the expression in a text element, it just puts the HTML string in the popup so I tried the Arcade element which did produce a working hyperlink, but it seems to ignore the javascript in there and just open the page in another tab. Here's the expression I made:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var inParam = $feature["wmext_Pole_JPA"];
if (IsEmpty(inParam)) {return ""};
var base_url = "https://scjpc.net/search/jpa/details/";
inParam = Replace(inParam, '-', '');
inParam = Replace(inParam, ' ', '');
inParam = Replace(inParam, '/', '');
base_url =  base_url + inParam;
var returntxt = "&amp;lt;a href='" + base_url + inParam + "' target='_blank' onclick=\"window.open(this.href, 'newwindow', 'width=800,height=600'); return false;\"&amp;gt;HTML&amp;lt;/a&amp;gt;";

return { 
	type : 'text', 
	text : returntxt //this property supports html tags 
}&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 20 Sep 2024 23:01:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/hyperlink-in-popup-to-open-in-new-window/m-p/1541101#M61621</guid>
      <dc:creator>Pukawai</dc:creator>
      <dc:date>2024-09-20T23:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: Hyperlink in Popup to open in new window</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/hyperlink-in-popup-to-open-in-new-window/m-p/1541108#M61622</link>
      <description>&lt;P&gt;When you add a text element, click the source &amp;lt;&amp;gt; icon to edit in html. See the tip on this documentation page:&lt;/P&gt;&lt;P&gt;&lt;A href="https://doc.arcgis.com/en/arcgis-online/create-maps/configure-pop-ups-mv.htm#ESRI_SECTION1_B7B559DA30964877909B95706627B007" target="_blank"&gt;https://doc.arcgis.com/en/arcgis-online/create-maps/configure-pop-ups-mv.htm#ESRI_SECTION1_B7B559DA30964877909B95706627B007&lt;/A&gt;&lt;/P&gt;&lt;P&gt;However this actually won't work the way you want it to, ever.&lt;/P&gt;&lt;P&gt;&lt;A href="https://doc.arcgis.com/en/arcgis-online/reference/supported-html.htm" target="_blank"&gt;https://doc.arcgis.com/en/arcgis-online/reference/supported-html.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;When an a tag is used, the href target URL always opens in a new browser tab.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I thought it might be enforced by end users browser's but it looks like this is also enforced by ArcGIS.&lt;/P&gt;</description>
      <pubDate>Sat, 21 Sep 2024 00:17:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/hyperlink-in-popup-to-open-in-new-window/m-p/1541108#M61622</guid>
      <dc:creator>ChristopherCounsell</dc:creator>
      <dc:date>2024-09-21T00:17:51Z</dc:date>
    </item>
    <item>
      <title>Re: Hyperlink in Popup to open in new window</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/hyperlink-in-popup-to-open-in-new-window/m-p/1541111#M61623</link>
      <description>&lt;P&gt;Thanks for those links. I did follow that tip and used the source button, but just got the HTML string.&lt;/P&gt;&lt;P&gt;Most browsers default to opening things in tabs, but I set mine to open in new windows, so is enforced by ArcGIS, but additionally I don't think you can embed Javascript in the HTML. Just for grins I tried this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;&amp;lt;H1 onclick="alert('clicked'); " ############################## &amp;lt;/H1&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and it didn't work either.&lt;/P&gt;&lt;P&gt;Bummer.....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Sep 2024 02:26:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/hyperlink-in-popup-to-open-in-new-window/m-p/1541111#M61623</guid>
      <dc:creator>Pukawai</dc:creator>
      <dc:date>2024-09-21T02:26:28Z</dc:date>
    </item>
  </channel>
</rss>

