Hey Everyone,
I can't for the life of me seem to get the onOpenFn of
openInfoWindowHtml to work. I've tried the setTimeout method after
the function call too and had no success - everything fires before the
window and it's content appears.
This is a problem since i'm trying to add listeners onto some of the
content that appears in the InfoWindow.
Everything else about the code works fine.
Relevant code is as follows (note: there's some use of jQuery):
GEvent.addListener(marker, options.pointOpenHTMLEvent, function(){
var add_opts = {
maxContent: options.pointMaxContent,
maxTitle: options.pointMaxTitle,
onOpenFn: options.infoWindowCallback(marker, options)
}
marker.openInfoWindowHtml("<div id=\"wrap\">"+options.pointHTML+"</
div>", add_opts);
});
where options.infoWindowCallback(marker, options) is:
function(){
jQuery('a').click(function(){
alert('blargh');
return false;
});
alert('test');
}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---