Title: Click Event Handler
Last modified: November 4, 2020

---

# Click Event Handler

 *  [qqdoe](https://wordpress.org/support/users/qqdoe/)
 * (@qqdoe)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/click-event-handler-2/)
 * Hello,
 * I am trying to to get a click event handler working on a popup window so I can
   do some further processing on the anchor tag ID. As a test, I have a marker set
   up with the following popup html:
 * `<h4><a id="IDCODE" href="https://www.example.com/" rel="noopener noreferrer"
   target="_blank" onclick="alert(this.id)">Test</a></h4><br/>`
 * In the marker edit page the click event works. I get an alert with the ID value.
   However, when I visit the page that contains the map, the click event does nothing.
 * What is the proper way to handle click events on popup windows? Thanks.
    -  This topic was modified 5 years, 7 months ago by [qqdoe](https://wordpress.org/support/users/qqdoe/).
    -  This topic was modified 5 years, 7 months ago by [qqdoe](https://wordpress.org/support/users/qqdoe/).
    -  This topic was modified 5 years, 7 months ago by [qqdoe](https://wordpress.org/support/users/qqdoe/).
    -  This topic was modified 5 years, 7 months ago by [qqdoe](https://wordpress.org/support/users/qqdoe/).

The topic ‘Click Event Handler’ is closed to new replies.

 * ![](https://ps.w.org/leaflet-maps-marker/assets/icon.svg?rev=970936)
 * [Leaflet Maps Marker (Google Maps, OpenStreetMap, Bing Maps)](https://wordpress.org/plugins/leaflet-maps-marker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/leaflet-maps-marker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/leaflet-maps-marker/)
 * [Active Topics](https://wordpress.org/support/plugin/leaflet-maps-marker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/leaflet-maps-marker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/leaflet-maps-marker/reviews/)

## Tags

 * [popup](https://wordpress.org/support/topic-tag/popup/)

 * 0 replies
 * 1 participant
 * Last reply from: [qqdoe](https://wordpress.org/support/users/qqdoe/)
 * Last activity: [5 years, 7 months ago](https://wordpress.org/support/topic/click-event-handler-2/)
 * Status: not resolved