Click here to Skip to main content
15,843,200 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I can open whatsapp from standart href link without any problem. Also firefox is works very good.
But i need javascript for sending location. So i write a javascript code.
If i open it on private web page and using command it works perfectly.
But if i open it from normal tab it doesn't work. My web page also has ssl certificate.
What is the wrong ?

What I have tried:

  if (navigator.geolocation) {
			  navigator.geolocation.getCurrentPosition(function(position) {
            var whatsAppLink='whatsapp://send?text='+position.coords.latitude+','+position.coords.longitude+'&phone=+31623239665';;
Updated 29-May-17 4:28am

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900