Automatically dial a phone number

I have a webpage where I have a button. I need to automatically dial a phone number with the click of a button. This needs to be done in HTML.

I need to do this in the onclick event of a button

+9
source share
5 answers

On mobile devices, there are protocol handlers for launching the phone. Depending on the security, some dial it, or others will bring a number to the phone application already there.

<a href="tel:+15555555555">Call me at +1 (555) 555-5555</a> 
+32
source

I have used this in the past for mobile applications:

 <button id="call">Call</button> <script> $("#call").on('click', function() { var link = "tel:18003334444"; window.location.href = link; }); </script> 

This of course uses jQuery.

+1
source

Well, I don’t think it’s possible in HTML ... Have you done any research in Java or PHP? A quick google shows the main central API and Java phone , but I don’t know how much they will help. In addition, for future reference, if you tell us what you want to do with this number, will you connect it to another phone number? To your computer? Etc. Despite this, it will be a rather complicated project, and it would be so even if you were satisfied with the real programming language. Your best approach would be to figure out your options and then go back to the stack overflow if you need help choosing it. Good luck

0
source

This is just a link to call ... There is nothing automatic about this, so the current answer is invalid.

I need a script to automatically follow the tel link: when the user visits the site page.

The marketing platform that I use does not allow clicking on links in their special forms. Regular <forms> do not work on their platform, and URL redirects also do not work. Their CTAs that allow tel: links do not capture any information for offline conversions, so I want to get gclid and parameters when they click on a form that redirects them to a regular web page, and then I want to immediately execute the script to call me. Users think they are calling me when they are actually redirected to this special calling page. I tried to use call tracking software, but for some reason they don't get gclid. That’s why I am creating a workaround to get offline conversion data.

0
source

I have to declare a commercial interest. I work for Cisco, and we developed the JavaScript SDK and browser plugin that let you do this, but only in a Cisco deployment. If you are interested, here is the link: -

http://developer.cisco.com/web/jabber-developer/jabber

-1
source

Source: https://habr.com/ru/post/1386243/


All Articles