vvilyin
2008-10-06 03:37:42 UTC
I want to use button in InfoWindow in Mapplet.
That is for saving additional info from InfoWindows.
But it does not work.
///////////////////////////////////////
var map = new GMap2();
var marker = new GMarker(new GLatLng(56,37));
map.addOverlay(marker);
var mess = "It works";
marker.openInfoWindow("<input type='button' value='Test'
onclick='alert(mess)'>");
///////////////////////////////////////
Alert does not work after pressing the button. Why?
That is for saving additional info from InfoWindows.
But it does not work.
///////////////////////////////////////
var map = new GMap2();
var marker = new GMarker(new GLatLng(56,37));
map.addOverlay(marker);
var mess = "It works";
marker.openInfoWindow("<input type='button' value='Test'
onclick='alert(mess)'>");
///////////////////////////////////////
Alert does not work after pressing the button. Why?