AnsweredAssumed Answered

Pop up webmap vs Pop up WAB

Question asked by a.hirschi-wyssesri-rw-esridist Employee on Aug 14, 2017
Latest reply on Nov 12, 2017 by a.hirschi-wyssesri-rw-esridist

Inspired by How To: Add an image at the top of pop-up windows in ArcGIS Online, I'm trying to configure a pop up (customised html attribute display).

The data contains several images (as online links), but not all features have all images to display. So I packed the img tag into an object tag, give a width-size and a title to the object:


<object data="{Layer1}" style="width:230px;" title="0-15m" type="image/jpg">
<img src="{Layer1}" />
<object data="{Layer2}" style="width:230px;" title="0-15m" type="image/jpg">
<img src="{Layer2}" />

It all works fine in the webmap, images are well aligned, no horizontal scrollbar, title shows up on mouse over and there is no "broken" image display (just a little empty space), if img src is empty:



Going to my web app (online Web AppBuilder launchpad theme), there are broken images (where src is empty), the width is ignored and the title doesn't show up. It seems that WAB doesn't recognise the <object>-tag.




Another solution would be to hide img tags with empty src with some css:


img[src=""] {
display: none;

This even makes the empty space disappear in the web map pop up,

but displays in WAB like:



Finally this happens: I close the webmap completely, and open it again. Now the pop up is "messed" up like the one in WAB, and looking at the code, the <head> and <style> tags are gone and the img[src=""] is replaced by img[src=&quot;&quot;], and with the first solution, the <object> tags have vanished.


Guess I have to abandon this, but anyway thanks in advance for any hint,



Web AppBuilder for ArcGIS