<?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 Popup link query in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-link-query/m-p/1217384#M78867</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I've created a popup and the link isn't working as expected. Hopefully it's a simple fix to something I've done wrong.&lt;/P&gt;&lt;P&gt;I'm creating a map where a user can click anywhere on the map and it will load a popup with a link to report fly tipping. When the user clicks the link it will open a webform and populate the x/y into the form.&lt;BR /&gt;&lt;BR /&gt;Here is my code:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;view.popup.autoOpenEnabled = false;
       view.on("click", (event) =&amp;gt; {
       if (view.scale &amp;lt;= 3500) {
      const x = Math.round(event.mapPoint.x * 1) / 1;
      const y = Math.round(event.mapPoint.y * 1) / 1;
        
     view.popup.open({
     title:"Fly tip issue&amp;lt;br&amp;gt;",
     content:"&amp;lt;a href=\"https://https://east-riding-self.test.achieveservice.com/service/Fly_tipping_report" +"?Easting=" + x + "&amp;amp;Northing=" + y + "\" rel=\"nofollow ugc\"&amp;gt;" +
			"&amp;lt;font size=\"6\"&amp;gt;Click Here&amp;lt;/font&amp;gt;&amp;lt;/a&amp;gt;",
      location: event.mapPoint
       });
       }
     });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;The issue I'm having is that when you load the popup and click on the link it does nothing. I've checked the console and it returns 'refused to display '&lt;A href="https://east-riding-self.test.achieveservice.com/" target="_blank"&gt;https://east-riding-self.test.achieveservice.com/&lt;/A&gt;' in a frame because it set 'X-Frame-options to 'sameorigin'.&lt;BR /&gt;&lt;BR /&gt;If I hover over the link it displays the webform URL fine and if I put the URL direct into my browser it also works fine:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ITApplications_0-1664461770041.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/52515i61904D52CB484554/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ITApplications_0-1664461770041.png" alt="ITApplications_0-1664461770041.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&amp;nbsp;&lt;A href="https://east-riding-self.test.achieveservice.com/service/Fly_tipping_report?Easting=501456&amp;amp;Northing=449393" target="_blank" rel="noopener"&gt;https://east-riding-self.test.achieveservice.com/service/Fly_tipping_report?Easting=501456&amp;amp;Northing=449393&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I've got other maps with popup links to other forms on the same site and they work fine. Those popups however are linked to features and use custom content. Therefore it leads me to think I've constructed this pop up wrong and that's what's creating the error. Please advise.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Ricky&lt;/P&gt;</description>
    <pubDate>Thu, 29 Sep 2022 14:32:01 GMT</pubDate>
    <dc:creator>ITApplications</dc:creator>
    <dc:date>2022-09-29T14:32:01Z</dc:date>
    <item>
      <title>Popup link query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-link-query/m-p/1217384#M78867</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I've created a popup and the link isn't working as expected. Hopefully it's a simple fix to something I've done wrong.&lt;/P&gt;&lt;P&gt;I'm creating a map where a user can click anywhere on the map and it will load a popup with a link to report fly tipping. When the user clicks the link it will open a webform and populate the x/y into the form.&lt;BR /&gt;&lt;BR /&gt;Here is my code:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;view.popup.autoOpenEnabled = false;
       view.on("click", (event) =&amp;gt; {
       if (view.scale &amp;lt;= 3500) {
      const x = Math.round(event.mapPoint.x * 1) / 1;
      const y = Math.round(event.mapPoint.y * 1) / 1;
        
     view.popup.open({
     title:"Fly tip issue&amp;lt;br&amp;gt;",
     content:"&amp;lt;a href=\"https://https://east-riding-self.test.achieveservice.com/service/Fly_tipping_report" +"?Easting=" + x + "&amp;amp;Northing=" + y + "\" rel=\"nofollow ugc\"&amp;gt;" +
			"&amp;lt;font size=\"6\"&amp;gt;Click Here&amp;lt;/font&amp;gt;&amp;lt;/a&amp;gt;",
      location: event.mapPoint
       });
       }
     });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;The issue I'm having is that when you load the popup and click on the link it does nothing. I've checked the console and it returns 'refused to display '&lt;A href="https://east-riding-self.test.achieveservice.com/" target="_blank"&gt;https://east-riding-self.test.achieveservice.com/&lt;/A&gt;' in a frame because it set 'X-Frame-options to 'sameorigin'.&lt;BR /&gt;&lt;BR /&gt;If I hover over the link it displays the webform URL fine and if I put the URL direct into my browser it also works fine:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ITApplications_0-1664461770041.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/52515i61904D52CB484554/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ITApplications_0-1664461770041.png" alt="ITApplications_0-1664461770041.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&amp;nbsp;&lt;A href="https://east-riding-self.test.achieveservice.com/service/Fly_tipping_report?Easting=501456&amp;amp;Northing=449393" target="_blank" rel="noopener"&gt;https://east-riding-self.test.achieveservice.com/service/Fly_tipping_report?Easting=501456&amp;amp;Northing=449393&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I've got other maps with popup links to other forms on the same site and they work fine. Those popups however are linked to features and use custom content. Therefore it leads me to think I've constructed this pop up wrong and that's what's creating the error. Please advise.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Ricky&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 14:32:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-link-query/m-p/1217384#M78867</guid>
      <dc:creator>ITApplications</dc:creator>
      <dc:date>2022-09-29T14:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: Popup link query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-link-query/m-p/1217420#M78870</link>
      <description>&lt;P&gt;Have you tried adding&amp;nbsp;target="_blank" to your HTML link? That will open the link in a new tab/window which might help you get around the CORS issue.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 15:09:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-link-query/m-p/1217420#M78870</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2022-09-29T15:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: Popup link query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-link-query/m-p/1217429#M78871</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/146007"&gt;@SteveCole&lt;/a&gt;&amp;nbsp;, that sounds promising, where would I add that in my HTML link please?&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 15:21:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-link-query/m-p/1217429#M78871</guid>
      <dc:creator>ITApplications</dc:creator>
      <dc:date>2022-09-29T15:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: Popup link query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-link-query/m-p/1217438#M78872</link>
      <description>&lt;P&gt;You would add it just like your use of "rel=nofollow" option. The order you drop it in doesn't matter- either drop it in before or after your "rel" option.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a" target="_blank" rel="noopener"&gt;HTML A Reference.&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 15:32:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-link-query/m-p/1217438#M78872</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2022-09-29T15:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: Popup link query</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-link-query/m-p/1217765#M78879</link>
      <description>&lt;P&gt;That's fantastic, thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/146007"&gt;@SteveCole&lt;/a&gt;&amp;nbsp;that's worked perfectly! I'm still learning JS and HTML and that's really useful to know. Thanks again.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2022 07:34:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-link-query/m-p/1217765#M78879</guid>
      <dc:creator>ITApplications</dc:creator>
      <dc:date>2022-09-30T07:34:08Z</dc:date>
    </item>
  </channel>
</rss>

