Log in

View Full Version : Selecting a point on a Google Map with a drop down form



myscranton
05-13-2009, 03:05 AM
I am working on a website where I have embedded a Google Map with Google Maps API. I understand how to go to a location on a map using
javascriptVoid:0 and


form action="#" onsubmit="showLocation(); return false;">
<p>
<input type="text" name="q" value="Address" class="address_input" size="30" />


</p>
</form>

What I would like to do is have a drop down list of locations such as


<form>
<select size="1">
<option name="1">Test</option>
</select>
</form>

so that when you submit the form, it goes to the location you have selected. I have tried to use the "if" value in javascript but that doesn't work.

Can someone please provide me with a code to do this?

Thank you