473,387 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Check for callto: protocol support using javascript

Hi,

I am developing a web-application which will start telephone-calls using a
special protocol (callto: or phone:)

There will be two groups of users, one with a phone-client installed and
support for the protocol,
and one without this client.

So I need to write a javascript-function to check if the callto: or phoneto:
protocol is available on the client.

ANY IDEAS???

If I just add the link for every user, the ones with no client will run into
an error message on every click:
"Protocol not supported" in firefox
"Page cannot be displayed" in IE

Regards Alexander
Jan 10 '06 #1
4 7807
Alexander escreveu:
So I need to write a javascript-function to check if the callto: or phoneto:
protocol is available on the client.
ANY IDEAS???
Call both url's with an image haha, I'm not sure if it will work anyway
:)

Like:
(new Image).src = "callto:lala";
If I just add the link for every user, the ones with no client will run into
an error message on every click:
"Protocol not supported" in firefox
"Page cannot be displayed" in IE


So, don't use it... It's not a standard and I don't know anything like
"hasProtocol" =/
--
Jonas Raoni Soares Silva
http://www.jsfromhell.com

Jan 10 '06 #2
VK

Alexander wrote:
Hi,

I am developing a web-application which will start telephone-calls using a
special protocol (callto: or phone:)

There will be two groups of users, one with a phone-client installed and
support for the protocol,
and one without this client.

So I need to write a javascript-function to check if the callto: or phoneto:
protocol is available on the client.

ANY IDEAS???


Are you going to make voice calls over HTTP protocol? If not then you
have to set new MIME type for the browser - then just check for
registered mime types.

Jan 10 '06 #3
VK wrote:
Alexander wrote:
I am developing a web-application which will start telephone-calls using
a special protocol (callto: or phone:)

There will be two groups of users, one with a phone-client installed and
support for the protocol,
and one without this client.

So I need to write a javascript-function to check if the callto: or
phoneto: protocol is available on the client.

ANY IDEAS???


Are you going to make voice calls over HTTP protocol? If not then you
have to set new MIME type for the browser - then just check for
registered mime types.


Does it not hurt you when you post such ridiculous utter nonsense? If not,
it should. Hopefully, that will eventually provide you an incentive to
stop doing that. Here is a hint for you: if you did not understand a thing
that was talked about and/or you do not have any clue, just *DO* *NOT*
*POST*!
PointedEars
Jan 10 '06 #4
Alexander wrote:
I am developing a web-application which will start telephone-calls using
a special protocol (callto: or phone:)
Which is not registered at IANA and therefore unwise to use.
tel:, as specified by RFC2806, is registered as URI scheme for
telephone calls.

<URL:http://www.iana.org/assignments/uri-schemes>
There will be two groups of users, one with a phone-client installed and
support for the protocol, and one without this client.

So I need to write a javascript-function to check if the callto: or
phoneto: protocol is available on the client.
And then do what? Tell the user that their configuration is not sufficient?
I bet they already know by then.
[...]
If I just add the link for every user, the ones with no client will run
into an error message on every click:
"Protocol not supported" in firefox
"Page cannot be displayed" in IE


And why is that not sufficient? If the link does not work and results in
displaying an error document, users will use their UAs Back feature. You
should provide additional information next to the link or in the
documentation of your application (maybe even before you can start using
it) what the requirements for its use or the use of its features are, what
the error message would mean and what to do when users encounter this
problem.

You cannot test with unprivileged client-side scripting whether a UA has a
working protocol handler configured for a protocol, and with privileged
script this probably is not cross-browser compatible (you will have to
access the UAs preferences directly for which there is no unified
interface). Due to the Same Origin Policy and URIs not necessarily meaning
resource retrieval -- especially it does not seem so in your case --, there
is no use in trying host objects like Image or XMLHttpRequest as the result
are but false positives regarding missing support.

So ISTM that what you want is simply not possible and you will either have
to rely on UA's behavior and your documentation to provide sufficient
information to the user or provide a user agent along with your "Web
application" that can handle this type of URIs.
PointedEars
Jan 10 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: Brad Tilley | last post by:
Instead of me arbitrarily assigning a high port number to a variable, is it possible to check for ports that are unused and then randomly assign one of them to a variable? Something like this is...
37
by: Mike Meng | last post by:
hi all, I'm a newbie Python programmer with a C++ brain inside. I have a lightweight framework in which I design a base class and expect user to extend. In other part of the framework, I heavily...
33
by: Steven Bethard | last post by:
Is there a good way to determine if an object is a numeric type? Generally, I avoid type-checks in favor of try/except blocks, but I'm not sure what to do in this case: def f(i): ... if x < i:...
1
by: Dom Leonard | last post by:
Hi all, I occasionally use the javascript protocol in window.open to retrieve a window property of the opener for use as HTML source: window.htmlSrc="<html>...blah ....<\/html>";...
1
by: Unregistered | last post by:
I'm making an Intranet site for someone who is not very familiar wit making websites, thus I would like to make it as simple as possible fo her when she needs to update it. The intranet site...
2
by: Axel Foley | last post by:
Hi Folks, i'm newbie at JS; but "learning by tweaking" is my middle name! Trying to set up a link partnership application on a client's site; got this script at "The Javascript Source", but it...
4
by: mscir | last post by:
Is it possible to detect whether a protocol client-side on any given user's machine? Thanks, Mike
4
by: Bob Badger | last post by:
Hi, Simple question (although I guess with a complicated answer). Is HTTP an async protocol? For instance, if I send a message to a c# webservice via http what is the protocol actually doing? ...
3
by: yawnmoth | last post by:
I've seen a few webpages that use the javascript pseudo-protocol with event handlers. eg. <input onkeyup="javascript: ..." /> Correct me if I'm wrong, but isn't onkeyup always supposed to be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.