Posted By

FXDB on 03/10/11


form html google maps

Versions (?)

Who likes this?

2 people have marked this snippet as a favorite


Get Directions Form (Google Maps)

 / Published in: HTML

saddr = blank input field for entering START address daddr = hard-coded END address

Enter an address and press button and a popup window opens with directions. Enter no address, and just a map of the END address opens.

  1. <form action="" method="get" target="_blank">
  2. <label for="saddr">Enter your location</label>
  3. <input type="text" name="saddr" />
  4. <input type="hidden" name="daddr" value="126 14th St Washington, DC 20005 (Work)" />
  5. <input type="submit" value="Get directions" />
  6. </form>

Report this snippet  

You need to login to post a comment.