Select to view content in your preferred language

Support HTML target attribute in web map popups

1556
3
03-30-2016 06:48 AM
Status: Open
Greg_Yetman
Regular Contributor

When configuring a web map popup, the interface allows access to the HTML tags. When creating a link from the popup, the default href target is "_blank"; changing the target to "_self" (or any other valid target) is ignored by ArcGIS Online--the resulting web map popup only supports "_blank". 

It would be great if changes made to the target attribute are respected by ArcGIS Online. 

3 Comments
Greg_Yetman
I did find a workaround using the JavaScript API and an InfoWindow. The InfoWindow will not replace the _self or _parent attributes with _blank. Note that the popup window in the JavaScript API will replace the attributes.
StephenKilburn
In my opinion, this is important if a web map is to be embedding in a site. The current behaviour may make sense for a map-centric site, but if the map is intended to add value to a site, rather than be central, it is not ideal. For instance, I was asked to produce a web map to embed in a site that has information about a planning proposal. The site has text and images on various elements of the proposal. The map locates those elements. What I wanted was for the popups to link to anchors within site sub-pages so that if the popup is clicked through the browser jumps away from the map to the detailed descriptive text. Opening the content in new tabs instead (_blank) is clunky. I hope the workaround posted works, but this seems easy enough to support in HTML that we shouldn't be forced to use a workaround.
MappyIan

I fully support this idea.

We configured a map in Map Viewer with a a popup which includes a hyperlink.  If I look at the source of the popup, the system has automatically added the attributes: target="_blank" rel="noopener noreferrer"

Now, for accessibility reasons it's better to have links open in the same window, so I changed target="_blank" to target="_self". But when I do this, the target of the hyperlink specified by the href attribute is stripped from the popups source automatically and leaves the link as: <a target="_self">, which goes nowhere as there is no href attribute.

If I remove the target="_blank" attribute, it just comes back, it's not possible to remove it.

To me this is a bug as changing the target from "_blank" to "_self" deletes the href.