'Referencing Firefox event objects via JavaScript
I am still using Google maps v2, and I am having trouble getting the event object from Firefox when a google event fires. Ultimately, I need the event object so that I can retrieve information about keys being pressed when the click event of a particular overlay fires. Here is some code:
GEvent.addListener(polys[i], "click", function(e) {
var evtObj = window.event? event : e;
for (var i=0; i<polys.length; i++) {
if ( this == polys[i] ) {
if (evtObj.ctrlKey) {
map.closeInfoWindow();
clickCounty(labels[i]);
}
other stuff to happen....
}
});
This works fine in IE and Chrome. The variable e passed into the function is the lat/long of the click event. So how would I reference the Firefox event object rather than the Google event lat/long..?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
