Hello,
I need to add an onclick event to my href link or whatever element
(<DIV>) in the infowindow.
When the user clicks the element (href or whatever) that is in the
infowindow, I need a popup window (window.open) to occur.
Problem is, the event is not firing. I have tried both href and div
onclick events:
function createMarker(point, name, code, icon) {
[...]
info = '<B>Station: ' + name + '</B><BR>' +
'Code: ' + code + '</B><BR>' +
'<A HREF=' + href +
' onclick="window.open(href,
windowname);return false;">Show Info Window</A>';
}
GEvent.addListener(marker, "click", function() {
//map.openInfoWindowHtml(point, info);
marker.openInfoWindowHtml(info);
});
----------------------------
I even tried this:
GEvent.addListener(marker, "click", function() {
//map.openInfoWindowHtml(point, info);
marker.openInfoWindowHtml(info);
document.getElementById('showinfo').onclick = function
(e) {
if (!e) e = window.event;
window.open(href, windowname);
}
});
No event fires when user clicks on the element in the infowindow.
Is this impossible to do?
Thanks,
Kalyson
--
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-api?hl=en.