-4

I love to use try catch on a lot of my programs in C#. I was working on a website and I was using:

<a href="skype:freepcadvice?call">Call 555-555-5555</a>

But if they don't have skype of course there is an error, which I would like to redirect to say something like "Skype not installed, here is a download link". I am guessing this would probably have to be handled by Java script, but wasn't sure if HTML had such a feature?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
DDJ
  • 807
  • 5
  • 13
  • 31
  • On Firefox I get a native "The address wasn't understood" error. I find it clear already. I don't think you can't detect it to customize it. – Oriol Dec 25 '15 at 18:35
  • [Check if Custom URL scheme is available](http://stackoverflow.com/questions/24571548/javascript-how-to-detect-if-the-custom-url-scheme-is-available-or-not-availabl) ? – Perdomoff Dec 25 '15 at 18:46
  • http://stackoverflow.com/questions/1164004/how-to-mark-up-phone-numbers – mariocatch Dec 25 '15 at 18:47

2 Answers2

5

HTML is a mark up / display language. It does not have any conditions or methods to handle errors. You could use JavaScript, or a server side language like c# or php.

devlin carnate
  • 8,309
  • 7
  • 48
  • 82
1

This is a little complicated. What you want to do is detect whether or not Skype is installed on an end-users computer, and that isn't trivial.

You can view some of the answers here, but it requires a bit of sophistication with JavaScript, and uses jQuery to boot. Good luck!

Community
  • 1
  • 1
Mike Lawson
  • 735
  • 6
  • 12