Add script to popup

2395
2
Jump to solution
09-01-2016 01:49 AM
DanikBourdeau
New Contributor III

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
New Contributor II
2 Replies
Buseİbşiroğlu1
New Contributor II

As far as I know only HTML is used.

Supported HTML—ArcGIS Online Help | ArcGIS 

DanikBourdeau
New Contributor III

Thanks Buse.  I must have missed that page.

0 Kudos