Jump to content

edmon

New Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by edmon

  1. Hi there. Yes I got the location. But I have no idea how to call the that link outside of the <script> tab. Using Js or imap or what can I use? Any suggestion please
  2. I am trying to create simple web that user can send their location via SMS using geolocation . The problem is I couldn't put link to SMS body. How can I put link on it? Any suggestion please, here is my code: <html> <head> <title>Please SEND your location</title> <script> if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function (position) { const geoLocation = { latitude: position.coords.latitude, longitude: position.coords.longitude, }; console.log('Their location --->', geoLocation); }); } </script> <p> <a href="sms:+123456789?&body=https://www.google.com/maps/search/?api=1&query=${geoLocation.latitude},${geoLocation.longitude}">Sending a location</a> </p </html>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.