POST Assistance.

13 views
Skip to first unread message

clothwiring

unread,
Jan 4, 2012, 11:06:30 AM1/4/12
to google-map...@googlegroups.com
I am new to the Google Maps API.  I have a client that wants to have a small form (street address and zip) on one page POST to a page that normally does the maps work (with all options that someone can select).  Can someone point me in the right direction?  Thanks!

Barry Hunter

unread,
Jan 4, 2012, 7:59:05 PM1/4/12
to google-map...@googlegroups.com
Just have the server side code - that 'draws' the second page, write
out the posted values into javascript variables - which the maps api
implemention the uses as it sees fit.

example with PHP...

<script type="text/javascript">
var address = '<? echo addslashes(htmlentities($_POST['address'])); ?>';
var zip = '<? echo addslashes(htmlentities($_POST['zip'])); ?>';

//javascript doing something with those values...
</script>

> --
> You received this message because you are subscribed to the Google Groups
> "Google Maps JavaScript API v3" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-maps-js-api-v3/-/RVB-x9Hx_mYJ.
> To post to this group, send email to google-map...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-maps-js-a...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply all
Reply to author
Forward
0 new messages