Popup - js in bindPopup does not execute

23 views
Skip to first unread message

Ian Walberg

unread,
May 11, 2016, 1:46:43 PM5/11/16
to Leaflet
We have been trying to include some js inside the bindPopup content and it does not appear to get executed.

Any css or html tags we include work as expected.

What are we missing?

Thanks

Ian

Ian Walberg

unread,
May 11, 2016, 5:46:13 PM5/11/16
to leafl...@googlegroups.com

We have modified this  http://leafletjs.com/examples/quick-start-example.html

 

To this :-

var this_marker = L.marker([51.5, -0.09]).addTo(mymap).bindPopup('<div style="color: red">Hello<br>world<script>console.log("testing");</script></div>').openPopup();

 

This gives an error.

 

Should this work?

 

Thanks

 

Ian

--

---
You received this message because you are subscribed to the Google Groups "Leaflet" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leaflet-js+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages