Select to view content in your preferred language

Add script to popup

2691
2
Jump to solution
09-01-2016 01:49 AM
DanikBourdeau
Deactivated User

I'm wondering if it's possible to add a script tag to a custom popup in ArcGIS Online.  It seems like I can add html tags but script tags just disappear.

As an example.  If I configure a popup for a layer and choose 'custom attribute display', I can view the html source.  If I add the code below, cof_div0 shows up fine but the script never runs to populate cof_div1.

<div id="cof_div0">This is div 0</div>
<div id="cof_div1"></div>
<script>document.getElementById("cof_div1").innerHTML = "Hello World"</script>

If the above is not possible, does anyone know how I can customise popups with javascript.  I need to calculate the date something is going to happen based on a couple of attributes from the layer.

Thanks,

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
Buseİbşiroğlu1
Emerging Contributor
2 Replies
Buseİbşiroğlu1
Emerging Contributor

As far as I know only HTML is used.

Supported HTML—ArcGIS Online Help | ArcGIS 

DanikBourdeau
Deactivated User

Thanks Buse.  I must have missed that page.

0 Kudos