consider browser support
document.getElementById("map").addEventListener("click", function(e) { alert("click"); });
must-read
No event listeners mean no user interaction
By Michal Zimmermann