Forum Moderators: open

Message Too Old, No Replies

Emailing Directions Option

Best method?

         

CSS_Kidd

6:38 pm on Jan 11, 2010 (gmt 0)

10+ Year Member



I have a site that uses a Google Maps API that is defaulted to show the location of a particular place. It can also generate directions when you input your location and click a submit button. I also have a link that will print just the div where the map and directions are generated (Using JavaScript).

Now I need to have an "email directions" option as well. So if I can print the Generated content of a div, is it also possible to create a "mailto" where it would automatically put that same content in the message's body? And if so what would be the best method to use? PHP? JavaScript? Anything else?

Just a quick note: When the directions are created it doesn't change the page's address. It just produces the results and the address remains the same clean address. So I can't target the address.

(If this targets a particular subject please fell free to move this post to it's corresponding subject.)

Seb7

3:12 pm on Jan 15, 2010 (gmt 0)

10+ Year Member



I personally would link the button to some Ajax JavaScript which sends the map information to a custom php page, which then puts the information in en email and sents it.

If your not familiar with Ajax, then the 'mailto' but could be a hidden form submission button which directs to a php page that does the work.

The easiest, but worse option is use a mailto:[email]?subject=[subject]&body=[body] ..something like that. I haven’t use this method for a long while.