b03tz / StoreLocator

StoreLocator is a MODX addon that let's your customers search for stores in their vicinity.
http://www.scherpontwikkeling.nl
6 stars 10 forks source link

Second form with address field #6

Open darkarchon opened 12 years ago

darkarchon commented 12 years ago

Can you propose how to create a form outside of StoreLocator page? Simple form that have an address input field.

I've tried, but it's only fill in form on S.L. page and nothing is searched. Maybe I need to initialize StoreLocator page some other method?

darkarchon commented 12 years ago

I guess I need to call, after page is loaded - function storeLocator_getStores() ?

darkarchon commented 12 years ago

script type="text/javascript"> storeLocatorGeocoder = new google.maps.Geocoder(); window.onload=storeLocator_getStores(document.getElementById('storelocator-query').value); script> /body>

darkarchon commented 12 years ago

Maybe I need call this function before then page is loaded? Because map initialized twice.