-1

my codes only opens the phone dialer and sits their. what it should do after pressing the button is it should automatically make phone call.

<html>
   <div> 
      <a rel="external" href="tel:+639086918061" 
         onclick="window.open('tel:+639086918061', '_system');" data-role="button">
      <img src="images/EMS.png" width="90px" height="90px"/></img></a>
 </div>
</html>
nnnnnn
  • 147,572
  • 30
  • 200
  • 241
  • 1. Put the code in the question. 2. You need to elaborate on your problem a lot more. – Carcigenicate Dec 03 '16 at 05:32
  • I hope that what you are asking for is not possible, because a link that automatically dials would be a security problem. – nnnnnn Dec 03 '16 at 05:33
  • but is it possible to make it automatically make phone call? i badly need to to this because its for my school project. – Ram Francia Dec 03 '16 at 05:37
  • @RamFrancia It shouldn't be possible to automatically do it. As nnnnnn points out, this could be a potential problem. Phones may open the dialer with that "address", but it would be ridiculous if it started dialing. You could random people to call a paid phone service and have them charged without their consent. Why would you need this for a project? – Carcigenicate Dec 03 '16 at 05:39
  • If you actually need this functionality, you'll need to make an app, not a webpage. – Carcigenicate Dec 03 '16 at 05:43
  • nope..its not my intention to call random numbers and charge them in phone service, that's why i put my own phone number in the code so that no other number will be called .. i'm developing mobile app that can automatically call the numbers that i inputted."my own phone number" this is part of my research project. thats why im looking for a solution..thanks – Ram Francia Dec 03 '16 at 05:45
  • It's not *your* intention, but if the phone's browser allowed it to work in a general sense then other people could put dodgy phone numbers on their pages. – nnnnnn Dec 03 '16 at 05:53
  • i just really need to make this work. to automatically make phone call to my numbers that i inputted.FYI the number that in the code is my own phone number. if i failed to make this work i'm gonna fail in my research project... is their any way?please... thank you.. – Ram Francia Dec 03 '16 at 06:08
  • @RamFrancia No, there's no way, at least not in a general sense for all browsers. Why are you trying to do this? I can't see what research could possibly hinge on this. – Carcigenicate Dec 03 '16 at 06:28
  • i'm not gonna use it in browser.like i said i'm developing an app for android user that can make phone call. that's all. nothing more. but thank you all for your responses. appreciated – Ram Francia Dec 03 '16 at 06:35

1 Answers1

2

Technically speaking, what you need to make this work is a "protocol handler" installed on your PC, or rather the PC of the person using your application, to handle the tel: protocol, which is a protocol just like http:. However, a web application cannot install such a handler--only the user can (or it could be installed as part of real, native application).

Of course, you're going to have to decide what you want the handler to do. For instance, Skype offers such a handler which the interprets the request as wanting to make a Skype call--it opens Skype and dials the number for you.

If your protocol can be handled via a webapp, then you register a web-based protocol handler. However, there is no way for a web page to make a phone call, so I can't see how this would help you very much.

If you want this to work within the WebView of a mobile app, you can probably consult the documentation to figure out how to tell the app to configure the webview to make the handler available within it. You could start off by looking at this question.

Community
  • 1
  • 1