How to send a custom SMS from html page? |
How to send a custom SMS from html page? |
Solution |
Aug 27 2024, 07:42 PM
Post
#1
|
Group: Members Posts: 1 Joined: 27-August 24 Member No.: 29,229 |
I am trying to make simple web page that using phone's current location with google map via SMS.
But I stuck with custom SMS body and even calling google map url. How can I create custom body like "I am here: https://www.google.com/maps?f=q&q=87.92...46.908853"? CODE <html> <head> <title>Geolocation</title> <!-- playground-hide --> <script> if (navigator.geolocation) { // device can return its location navigator.geolocation.getCurrentPosition(function(position) { console.log(position.coords.latitude); console.log(position.coords.longitude); }); } </script> <p> <a href="sms:+123456789?&body= + I am here: maps.google.com/position.coords.latitude + + position.coords.longitude..">Send location!</a> </p> </body> </html> |
Lo-Fi Version | Time is now: 7th December 2024 - 05:55 AM |