Select to view content in your preferred language

email field in popup as mailto: link

4683
5
Jump to solution
02-06-2015 06:35 AM
MattFegley
Occasional Contributor

I'm trying to use a field containing an email address in an anchor tag for a popup. I've tried

<a href="'mailto:' + {email1}">{email1}</a>

which appears as a link but doesn't work as a mailto:. I've tried various ways of escaping the inner quotes, like \' and \"

...anyone have a working email link like this is a popup? Thank you.

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Matt,

  I got it to work with this:

<a href="mailto:{NAME}">{NAME}</a>

View solution in original post

5 Replies
RobertScheitlin__GISP
MVP Emeritus

Matt,

  I got it to work with this:

<a href="mailto:{NAME}">{NAME}</a>

MattFegley
Occasional Contributor

Thank you once again Robert. It worked for me, although in my case it also opened a blank browser window also. I will try targeting options perhaps.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Matt,

   I think esri working with popup links in the API code (not exposed to change) and always sets the target to blank.

0 Kudos
MattFegley
Occasional Contributor

I added

target="_top"

to the anchor tag and the pesky browser window no longer appears.

Thanks for replying and all your help Robert!

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Matt,

   Good to know the target and be overridden.

0 Kudos