A code sample showing this is at http://www.geoffschultz.org/Test/infowindow.html
Click on the map to create the InfoBox and when you close it, it tries
to check the checkbox status.
and here's the section in question:
function clicked(event)
{
var responseText = '<form><input type="checkbox" id="dns"/>Do not
show this message again.</form>';
var pos = event.latLng;
// var infoWindow = new google.maps.InfoWindow({maxWidth: 1000,
position: pos, content: responseText});
var infoWindow = new InfoBox({maxWidth: 1000, position: pos, content:
responseText});
infoWindow.open(map);
google.maps.event.addListener(infoWindow, "closeclick", function()
{check();});
}
function check()
{
if (document.getElementById("dns").checked)
{alert("yes");}
}
Try changing the order in the source code (in
InfoBox.prototype.getCloseClickHandler_) and if you get the desired
behavior I can make the same change to the official code and tag a new
release. Just move "me.close() to after google.maps.event.trigger(me,
"closeclick");
Gary
On Dec 3, 6:13 am, GeoffSchultz <geoffrey.w.schu...@gmail.com> wrote:
> If I create an InfoWindow, I can use getElementById to inspect the
> status of things like a checkbox, but if I use an InfoBox, the element
> comes back as undefined. How do I do this?
>
> A code sample showing this is athttp://www.geoffschultz.org/Test/infowindow.html
It should fix your problem.
Gary