mootools-events

Adding event to element inside Google Maps API InfoWindow

社会主义新天地 提交于 2019-12-17 10:41:31
问题 I want to put a form with input field and submit button inside a Google Maps API (v3) InfoWindow. When submitted I would like to call a function that initiates the directions service using the address entered into the input field. Here's my code (I'm currently only testing whether the directions event is being fired. I've written the full getDirections() event and can confirm it works and returns directions when fired properly): I tried adding an event listener using MooTools, like this: var

Adding event to element inside Google Maps API InfoWindow

徘徊边缘 提交于 2019-11-27 12:25:10
I want to put a form with input field and submit button inside a Google Maps API (v3) InfoWindow. When submitted I would like to call a function that initiates the directions service using the address entered into the input field. Here's my code (I'm currently only testing whether the directions event is being fired. I've written the full getDirections() event and can confirm it works and returns directions when fired properly): I tried adding an event listener using MooTools, like this: var infoWindowContent = "<b>Get Directions From...</b><br />" + "<form id='map-form'>" + "Address/Postcode: