Automatically dial a phone number - html

I have a web page where I have a button. I need to automatically dial a phone number on the click of the button. It needs to be done in HTML.
I need to do it on the onclick event of the button.

On mobile devices, there are protocol handlers to launch the phone. Depending on the security, some will dial it, or others will bring on the phone application with the number already there.
Call me at +1 (555) 555-5555

I've used this in the past for mobile apps:
<button id="call">Call</button>
<script>
$("#call").on('click', function() {
var link = "tel:18003334444";
window.location.href = link;
});
</script>
This, of course, uses jQuery.

Well, I don't think this is possible in HTML... Have you done any research on Java or PHP? a quick google reveals a grand central API, and Java Phone, But I don't know how much help they will be. Also, for future reference, it helps if you tell us what you want to do with this number, will you be connecting it to another phone number? To your computer? Etc. Regardless, this is going to be a fairly complex project, and would be so even if you were comfortable with a real programming language. Your best approach would be to figure out your options and then come back to Stack overflow if you need help on choosing one. Best of luck!

I have to declare a commercial interest. I work for Cisco and we've developed a JavaScript SDK and browser plugin that enable you to do this, but only in a Cisco deployment. If you're interested, here's the link:-
http://developer.cisco.com/web/jabber-developer/jabber

Related

windows phone 8 - can app disable buttons?

I'm not a WP8 dev, but I wanted to write a little timer app for my toddler. Thing is, she shouldn't be able to turn it off by clicking 'home','back' or 'search', but by password only. Its for personal use only, so store policies/hackiness dont matter. I know it can be done on android, but how about WP8?
You could programatically block any back-button presses (though it's not compliant with windows phone store requirement), but there's no way to block start and search buttons.
Try encapsulating those buttons with some DuctTape

Send mouse events to inactive and hidden windows/WPF forms

I'm developing an app that needs to generate mouse events on a window Win32/WPF which may be minimized or hidden from view on the desktop.
I have tried the user32.dll APIs SendInput, SendMessage, PostMessage etc. These work only if the window is visible on the desktop. Would you know about any methods that work for hidden/inactive windows?
I've also tried .NET's UI Automation library. In this case, a window is brought to the front or I'm not able to get a clickable point for the control.
Any ideas how I can proceed? If I can proceed?
I don't know if you're still interested in an answer (I just stumbled upon this question out of sheer dumb luck), but have you tried making a global windows hook?
I have no honest idea on how to properly go about implementing one; but I know you should be able to add a global windows hook to, well, Windows, to listen for whatever events you want (should include mouse and keyboard events!)
Good luck...

How do I include extensions in the tel: URI?

I currently have a webpage serving up phone numbers, some of these phone numbers have extensions so I have written the HTML like this:
+44-1234-56788 / <a href="tel:+44-1234-567;ext=99">+44-1234-56799</a
When I hit this page in my Android browser and tap one of the phone numbers, it loads up in my phone dialer (UK Samsung Galaxy s2 stock) as:
+44-1234-567;ext=88
which I don't think is correct. Surely it should omit the ;ext= word.
Have I misread the RFC for implementing tel?
Seems the proper way to do it is use a comma:
+44-1234-567 ext.88
Just tested with iPhone and Android OS 2.1. Using ;ext=88 converts the ext bit into a number that is dialed with the extension (so it dials something like 35888 instead of 88).
Comment for How do I include extensions in the tel: URI?
As of June 2021 the RFC3966 ;ext= syntax still isn't implemented by Android, and it's inelegantly implemented by iOS.
Using ;ext=123 as an example:
Android: after the call connects a modal window appears asking Send the following tones? 396123 with No and Yes buttons. "Send the following tones?" is a precise technical description of what will happen if the user taps Yes, but it is probably not the best wording for the average user.
Android converts ;ext=123 into 396123 because it treats the letters the same way as if you were dialing something like 1-800-FLOWERS, and this is a broken implementation of the syntax.
iOS provides an option to the left of the Disconnect button that says Dial “ext=…”. When you tap on this "button" it will dial the extension number. This is inelegant and has bad usability because the "button" doesn't look like a button — it's just plain text — and because you can't see the extension number.
In addition, when you first tap on a phone link in iOS it presents a button at the bottom of the screen which partially rewrites the phone number into a local format, but which also preserves most of the ;ext= syntax, e.g. Call +1 (555) 555-5555;ext123. This is also inelegant, and it's ugly besides.
If you instead use just a ; which is supposed to mean "wait," as in "wait until the auto attendant message ends and then automatically dial the extension":
iOS: tapping the link displays a button stating Call +1 (555) 555-5555;123 which is slightly less ugly than the button described above.
iOs provides the same extension-dialing "button" described above except the extension number is visible, e.g. Dial “123”. It still has the other usability problems.
iOS does not automatically dial the extension after the message ends.
Android: after the call connects a modal window appears asking Send the following tones? 123 with No and Yes buttons.
Android does not automatically dial the extension after the message ends.
So for now, as of June 2021 it seems that the only way to include extensions in tel: links that will actually work is to use either ; for "wait" or , for "pause":
555-555-5555 ext. 123 — this will provide a UI component which the user can invoke to dial the extension. The usability of the UI component depends on the OS; neither are great, but Android's is arguably better.
555-555-5555 ext. 123 — this will automatically dial the extension a couple seconds after the call connects. Note: This mechanism will not work with voicemail systems that don't accept user input until the auto attendant message ends.
According to the documentation, you can add what you want like so 12345678;ext=123
See RFC 3966
In all the examples I saw, the value of ext is contained in the full number. So try including 88 in the href value:
+44-1234-56788
For those still wondering about this problem: I've found it best to use this format:
<a href="tel:+13235798328;22">
Standards at thenewcode from 3 months ago suggest using a microdata pause.
<a href="tel:+13235798328p22">
Related:
Different standards persist across different external platforms and may change the processing of URIs. Click to call
features on Google Developers docs do not specify
Example:
Office's Skype uses x to represent extension within skype.
I feel like this is kind of a cop-out answer, but if this is not implemented consistently across devices yet, probably best to just not include the extension and let people dial it by hand:
+44-1234-567 ext. 88
or
+44-1234-567 ext. 88
Better to make the user do more work than to send 1/2 your users to the wrong extension.
I don't get the answers to this question - I think the're wrong. The correct link would look like this:
+44-1234-567 ext. 88

using PopUpManager in a Flex 4.5 Mobile App

This is more of a best practices question rater than something technical.
I'm working on a mobile app using the Flex 4.5 SDK and I'm trying to figure out the best way to handle notification windows. In most cases these windows will be alerting the user to when something goes wrong. Ex: bad login, no data, cannot resolve server.
I'm using a singleton design pattern, I have a Requests class that handles server calls. Most popups will be originating from this class (IOErrorEvents from my loader being used to access the API). Since this class is a singleton and is used from all Views inside the app it is not aware of applications current view. I'm also not sure having this class keep track of the current view and having it push popups on top of it would be best practice.
I'm hoping that I can use PopUpManager to keep track of where to add popups and what popups are currently on the stage. Though all examples I've seen online about this show static Components being used in a views Declarations tag.
I'm really just looking for any examples or input on how you would solve this problem. Any help would be greatly appreciated!
I had the same problem, and sorted it by making an Alert popup component that you can call from anywhere in the code base, and it will pop up in the currently active window. It also has an always visible scrollbar text area which is handy
http://bbishop.org/blog/?p=502
It works for a view navigator application, but if your using a tabbed navigator application, you can add a call for that, or simply change the code to
mainTabbedNavigator = FlexGlobals.topLevelApplication.tabbedNavigator;
currentTab = mainTabbedNavigator.selectedNavigator as ViewNavigator;

Classic View/Mobile View Switch?

I'm building a version of my company's website with the jQuery Mobile framework. While it'd be fairly easy to do a javascript redirect to get users of mobile devices to our mobile site, I don't want to stop people from being able to view the classic website either.
What's the best way to accomplish this?
Our normal website is at:
us.companyname.com/
Our mobile website will be at:
us.companyname.com/mobile
There are some limitations, as we don't hold the domain name, our UK counterparts do, so getting anything done at the companyname.com level takes some patience. Basically, if anyone from North America comes to companyname.com, they'll get automatically redirected to us.companyname.com.
I do have full access to our website (written primarily in PHP & Expression engine, before I was here), and I'm free to do whatever as long as I don't mess anything up.
First, such things i would not do this with Javascript/Query, cause what is if the user has not activate js? It is better to do this server-side.
Something like this:
$mobile = array("IPHONE", "IPAD");
$flagMobileVersion = false;
if($_SESSION['version']!="mobile"){ //happens only at first visit
for($i=0;$i<=count($mobile)-1;$i++){
if(!strrpos(strtoupper($_SERVER['HTTP_USER_AGENT']), $mobile[$i]))
{
$flagMobileVersion = true;
break;
}
}
if($flagMobileVersion) {
$_SESSION['version'] = "mobile";
Header("www.mydomain.net/mobile"); //on first Visit
}
Would something like this work:
When a user visits http://us.companyname.com from a mobile device, use JavaScript to redirect them to http://us.companyname.com/mobile.
On the mobile site, provide a link to the classic view at http://us.companyname.com?noredirect=true
All you'd have to do differently is wrap the window.location redirection code on the main page inside an if statement that makes sure the noredirect flag isn't set to true. The only challenge would be isolating the noredirect query string, but this Stack Overflow question might help.