Hyperlinks in Popup Template JS API 4.3

2696
7
04-05-2017 11:37 AM
NathanSommers1
New Contributor

In the 4.3 version of the JS API, I can't format the hyperlinks within a popup to open. They open if you right click > open in new tab, but not just left clicking on the text itself. Below is the code I'm using for the template.

var annexationTemplate = {
    title: "{ANNEX}",
    content: "<strong>Ordinance:</strong> {ORD}" +
       "<br /><strong>Effective Date:</strong> {DATE:DateFormat(selector: 'date', fullYear: true)}" +
       "<br /><strong>Annexation Map: </strong><a target='_blank' href={URL_MAP}>Annexation Map</a>" +
       "<br /><strong>Legal Description: </strong><a href={URL_DESC}>Legal Description</a>"
 };

Anyone else come across this issue? It's new to me in 4.X. My previous apps build in 3.X have worked fine.

0 Kudos
7 Replies
RobertScheitlin__GISP
MVP Emeritus

Nathan,

   Strange when I add

<a target='blank' href='{POP2010}'>Legal Description</a>

to the:

https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=popupTemplate-... 

popuptemplate in the above sample it has a link that works fine for me.

0 Kudos
NathanSommers1
New Contributor

Thanks for the reply, Robert.

I gave this to a few users to test and they didn't seem to have any issues with it. It must be how I have something configured on my computer as it doesn't work with any Internet browser.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Nathan,

   Which browser and which version?

0 Kudos
NathanSommers1
New Contributor

My default is Chrome v57.0.2987.133. I've also tried Internet Explorer v11.953.14393.0 with no luck either.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Nathan,

   Strange indeed. I have no problem with that version of chrome.

0 Kudos
RyanCosby
New Contributor II

Nathan,

I am having this same problem. Did you ever figure out how to resolve it?

0 Kudos
NathanSommers1
New Contributor

Ryan,

No, I haven't figured out why it isn't working on my machine. It works on just about every other one I've tried, but not mine. I'm sure it's just some advanced configuration I changed a long time ago for some reason and now I don't remember where it is to change it back.

If I figure it out, I'll let you know.

0 Kudos