sending lat and long to google maps and returning directions on my web page.

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Possibly combine PHP and jQuery

On the directions.php page, the form that auto populates with the user's latitude and longitude uses the action page getDirections.php which is currently blank. The blank action page is why nothing happens when you press submit (obviously).

If I were you... I would remove the map and directions list box from the directions.php page, leaving just the latitude/longitude form.

Then, on the getDirections.php page, I would add the following to take the latitude and longitude from the form:

PHP Code:

<?

$latitude = $_POST["lat"];
$longitude = $_POST["longitude"];

$lat_long = $latitude.",".$longitude;

?>

And I would then use jQuery to create the directions map and list using the new lat/long data. This should be sufficient:

Man thanks a ton. that makes perfect sense to me... This is the last piece of the puzzle.
I dont think I am adding your script correctly. should i call the div test cause thats what you
made it in the javascript?

I can not thank you enough for the time you have put in to this... If there is anything I can do for you let me know.

I have it basically working but the map canvas is not appearing. its just showing the box borders and blank space in them.

Also I was thinking couldnt I just add the getDirections.php script in to the map_canvas div on the directions.php page and
change the POST to GET. Then just have a map on the page when you go to it and when you hit submit it generates your directions?

Did you try using the stand alone code I just posted. It should do exactly what you're asking. It displays the form and the blank map but when you click the submit button, it reloads the page but populates the map and list with the proper directions.