google maps - Add a button with onclick event in infowindow -
i trying add button onclick event in infowindow of google map api v3
var cont = "<div><h4><b>transformer</b></h4><label>name: </label>"+this.transformername.charat(0).touppercase()+this.transformername.substring(1)+"<br><label>site no: </label>"+this.siteno+"<br><label>substation no: </label>"+this.substationno+"<br><label>transformer no: </label>"+this.unitno+"<br><button onclick='voltagemodel()'>voltagetrend</button></div>"; console.log(cont); infowindow.setcontent(cont);
but onclick event not firing kindly help
try
<button onclick='voltagemodel();'>voltagetrend</button>
you missed ;
Comments
Post a Comment