0

I have created a link on my responsive website and I am trying to have the iphone dial the phone number when clicked. My phone is dialing the incorrect formatted number.

It is dialing +353 (051) 877 222

I wish to 051877222 if it is clicked inside Ireland

and I assume +35351877222 if outside

I will have two types of callers, those inside the country and those outside the country, each requires a slightly different format. There is no one format that I know of.

<a href="tel://+353-51-877222">
    <h3 class="pull-right">+353 (0)51 877222</h3>
</a>

Dose anyone know of a way to achieve having the one formatted number? Thanks

Keith Power
  • 13,891
  • 22
  • 66
  • 135
  • Use the international dialling code for everyone? – David Thomas Aug 30 '13 at 21:22
  • the international version unfortunately will not work when clicked inside the country +35351877222 – Keith Power Aug 30 '13 at 21:26
  • Really? I don't *doubt* you, but I am surprised, given that the +44 country code seems to work when dialled from within the UK. Unless I'm missing something obvious (long day...). – David Thomas Aug 30 '13 at 21:28
  • sorry you are right, long day for me too, so the problem I am having then is that the iphone is reading my code as +353 (051) 877 222 and not the number I have in the href – Keith Power Aug 30 '13 at 21:31
  • 1
    Have you tried the solution from here: http://stackoverflow.com/q/226131/82548 I don't know why the iPhone might even *try* to auto-link the text within an actual existing `tel` protocol link, but I figured it's worth asking. – David Thomas Aug 30 '13 at 21:33
  • thanks for the pointer, now I am aware that it is a Safari issue only. Unfortunately the suggestion the link did not work for me. I am going to update my question. – Keith Power Aug 30 '13 at 21:42

0 Answers0