マーカーをクリックすると、2 つの入力フィールドと 1 つのボタンを含む情報ウィンドウが表示されます。
情報ウィンドウを閉じると、ボタンが押されたかどうかを知りたいと思います。
どうすればできますか?
google.maps.event.addListener(marker[i],"click", function()
{
html = "Name: " + "<input type='text' id='name' />";
html += "Firstname: " + "<input type='text' id='firstname' />";
html += "<input type='button' id='okButton' value='OK' />";
infoWindow[i].setContent(html);
infoWindow[i].open(map,marker[i]);
});
google.maps.event.addListener(infoWindow[i],'closeclick',function ()
{
//action when the ok button was pressed or not
//this code doesn't work
$('#okButton').button().click(function()
{
//action
});
});