Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #27728
| From | Richard Maher <maher_rjSPAMLESS@hotmail.com> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Javascript TEL: URI support detection |
| Date | 2015-05-18 18:53 +0800 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <mjcgc2$ce6$1@speranza.aioe.org> (permalink) |
| References | <mj9jm9$tj0$1@speranza.aioe.org> <ccc9cb83-e4b1-4fa7-a52f-3885f6c6d0c3@googlegroups.com> |
On 5/18/2015 1:01 PM, Michael Haufe (TNO) wrote: > On Sunday, May 17, 2015 at 3:32:18 AM UTC-5, Richard Maher wrote: >> I've googled around and cannot find a reliable way to detect Browser and >> Device support for "TEL:" URIs with Javascript. >> >> If it's a mobile phone then the anchor link works as expected. But if >> it's a PC without telephone and voice capability it just fails silently :-( >> >> What solution(s) are you using? > > Short answer is that this is not possible by design. > Long answer is guesswork and hackish: > > All I could think of is to attach an onclick listener to the link(s), > then when they are clicked on attach an onblur event to the window >plus a short timer of say a couple seconds that will clean itself up. > > If the window blurs, you can guess with some probability that some >application registered to that protocol took control. If after a short >period of time (mentioned above) nothing took window focus, >assume protocol is not supported > Interesting. I hadn't seen this anywhere before and I've looked :-( I think your/our problem is although Chrome fails silently (all?) others (phoneless desktops) appear to try and fail to redirect to "tel:1234". Before reading your post I was starting to look at the ONBEFOREUNLOAD event as a way of offering the user an explanation that you shouldn't really be here and you probably don't have a phone capability. I think I was able to get Chrome to fail with window.location= and some sort of cross-domain failure on the protocol (or was that FireFox?) Anyway, thanks very much for the useful feed-back! Cheers Richard Maher PS. Please find a News Reader that wraps.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Javascript TEL: URI support detection Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2015-05-17 16:32 +0800
Re: Javascript TEL: URI support detection "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-05-17 11:32 +0200
Re: Javascript TEL: URI support detection Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2015-05-17 19:12 +0800
Re: Javascript TEL: URI support detection Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-05-19 21:59 +0200
Re: Javascript TEL: URI support detection "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2015-05-17 22:01 -0700
Re: Javascript TEL: URI support detection Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2015-05-18 18:53 +0800
Re: Javascript TEL: URI support detection "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2015-05-18 08:53 -0700
Re: Javascript TEL: URI support detection Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2015-05-19 21:13 +0800
Re: Javascript TEL: URI support detection "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2015-05-19 14:08 -0700
Re: Javascript TEL: URI support detection Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2015-05-21 06:10 +0800
Re: Javascript TEL: URI support detection Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2015-05-31 13:12 +0800
Re: Javascript TEL: URI support detection Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2015-06-01 18:52 +0800
Re: Javascript TEL: URI support detection "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2015-06-10 18:49 -0700
Re: Javascript TEL: URI support detection Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2015-06-13 08:15 +0800
Re: Javascript TEL: URI support detection Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2015-06-22 06:07 +0800
Re: Javascript TEL: URI support detection Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2015-06-22 06:08 +0800
Re: Javascript TEL: URI support detection "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2015-06-24 14:09 -0700
Re: Javascript TEL: URI support detection Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2015-06-25 18:54 +0800
Re: Javascript TEL: URI support detection "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2015-06-25 06:40 -0700
Re: Javascript TEL: URI support detection ittsmith1@gmail.com - 2015-07-20 18:57 -0700
csiph-web