I’m programming a new (wordpress) website and there is a “Contact” menu item. In this menu item I got a map (code by Google Maps iframe). Now I should have a route planner under the map. For this I got a little code:
<form name="search_route" method="get" action="http://maps.google.com/" target="_blank">
<input name="saddr" type="text" id="saddr">
<input name="daddr" type="hidden" id="daddr" value="Empire State Building, 350 5th Avenue, New York, NY, USA">
<input type="submit" name="Submit" value="Submit">
</form>
My problem: The code is working, but it links to maps.google.com
like I told the form. But the route should plan on the iframe
I got on the page and not open another link. Is this possible? If yes, can someone give me a hint?
Thanks in advance
Cheers
Sample-code:
The
action
of the form has to behttps://www.google.com/maps
The
target
of the form has to be equal to thename
of theiframe
Add hidden inputs to the form for each parameter you got via the iframe-src of the embed-code(at least a field for
output:embed
is required)Demo: http://jsfiddle.net/doktormolle/3JsuM/