scriptygoddess RSS Feed
 
 
 
 

Make phone numbers clickable to dial on mobile phones.

If you're designing a page for a mobile web browser, and you want to make the phone number "clickable" so that a mobile web browser can click and dial the number, just add the code below:
<a href="wtai://wp/mc;8015551212">801-555-1212</a>

update: Sadly I really should check out THIS site on a mobile browser, so I have no idea if it's useful or not – but just in case you're coming here FROM a mobile browser and want to test it out – here is a sample link: 801-555-1212

update#2: Thanks to a comment from Jane, I've now learned that Apple's iPhone needs that formatted differently:
<a href="tel:1-801-555-1212">1-801-555-1212</a>
I've tested it on my phone (which isn't an iPhone) and it still works. I have an LG-VX8100. If you test it, please leave a comment indicating what kind of phone/browser you're using and if it worked or not…

Please test the following link:
1-800-555-1212

31 Responses to “Make phone numbers clickable to dial on mobile phones.”

  1. 1
    Metah Blog » Blog Archive » Make phone numbers link clickable to dial on mobile phones.:

    [...] tips from Scriptygoddess on how to make phone numbers link clickable to dial on mobile phones.It works great [...]

  2. 2
    Christine:

    Ok, how cool is that? So very awesome!

  3. 3
    steve:

    great, i've tested on my old SE p800, works!

  4. 4
    Brant Tedeschi:

    I wish I could test this out to be sure, but I'll take his word for it. At least now I know its possible :)

  5. 5
    w33b:

    very nifty! works on opera mini on my sony ericsson w850i.

  6. 6
    Jane:

    Obligatory iPhone related post :)

    The Apple iPhone web dev guidelines doesn't actually mention the wtai://… style links, they want people to do:
    <a href="tel:1-800-555-1212">1-800-555-1212</a>
    ex.1-800-555-1212
    instead, for some reason. Unfortunately I can't remember where that came from, something tells me its a microformats thing but it doesn't seem to be…

    In addition, Safari on iPhone parses phone numbers when they're in some common format, e.g. 800-555-1212 to make them clickable so you can click to call. Just a heads up.

    Unfortunately, this means that the wtai://… numbers aren't usable on the iPhone.

  7. 7
    Jennifer:

    I guess when designing the page – you'd have to do a check to see if it's an iphone and if so render it as you mentioned – and if not – use the wtai:// method – because simply putting the phone number in the "href" like that won't work on other phones I've seen. Only the "wtai" method works on those.

    I responded before I saw your second post indicating the "tel" in the href as well (I combined the two comments so they make more sense now) :) … That method still seems to work. I'm revising the post to see if others can test as well…

  8. 8
    Jane:

    It's odd that Apple would do something like that, they explicitly come out and say WML is unsupported while a bunch of other standards are on a phone, hopefully this will change in the future

    Yeah, I was fairly sure the Apple method doesn't really work anywhere else, and I've never seen it used anywhere except for the iPhone too.

    Just a heads up though, for anyone trying to linkify phone numbers for iPhone webapps.

  9. 9
    Ajicool:

    It works on my phone too, SE T630 standard browser.
    But if I use mini opera from the same phone, it won't work.(can't move to link)

  10. 10
    BCKing:

    I found this page interesting and threw together a few scripts for Shoretel users. It makes use of dial.exe which is a free program. What is does is register callto: and tel: and sends those links to the Shoretel client to dial the phone. It will also do right click dialing too. I tested on the link on your page and it works great.

    download at http://blog.timberlinedealerships.com/it/2007/07/26/dialing-shoretel-from-a-web-page/

  11. 11
    burdock:

    BCKing, your script doesnt work at my SE W800i =((( why?

  12. 12
    BCKing:

    I don't know what a SE W800i is or how to integrate it into a Shoretel system. When you find out post what you did to integrate it.

  13. 13
    Jennifer:

    Just a quick google search on that; I think it's a Sony Ericsson W800i. Not that that helps figure out the problem much. :)

  14. 14
    BCKing:

    You're right Jennifer, I posted scripts for Windows XP. I still don't know what burdock was asking for.

  15. 15
    Harlan Iverson:

    works on opera mobile 8.65 / t-mobile mda. thanks.

  16. 16
    tcoburn:

    I have the LG-VX8100 also, but thru Verizon. its all we can get out here :(

    This is useful to me though, because I am going completely blind due to a recent eye condition, and I can use my website to store important phone #s when speed dial isn't enough. Since these phones aren't accessibility friendly, it may be easier for me to do something like this instead. thanks for the tip!

  17. 17
    ryan:

    Thanks a bunch. My maintenance page on my property website now directly plugs the tenants phone number into my task list on my iphone!

  18. 18
    hiramgf:

    i have pocket pc. tel and wtai both work.

    with WTAI you can also make a link to "add to contacts" like so: href="wtai://wp/ap;4805555555;Mr New"… so it has the "ap" part instead of the "mc". How would you do this with iPhone?

  19. 19
    Ian:

    Works in Android Emulator.

  20. 20
    Blake:

    I am having trouble in the opposite direction.

    I want to stop iPhone from automatic recognize a set of numbers as a phone and to "stop" from iPhone from making the number clickable.

    The number format I have is 1999-2008 which is actually a copyright, yet I could "dial" it from my iPhone.

    Any thoughts?

    Thanks,

    Blake

  21. 21
    Jen:

    I LOVE YOU! I've been trying to find out how to do this for weeks now, and you helped me. Thank you so much for putting this out there.

  22. 22
    KentonTech » Blog Archive » Link to dial phone number in mobile browsers:

    [...] This was a very neat post found on http://www.scriptygoddess.com describing how to create a link that will automatically dial the specified number. The post can be found here. [...]

  23. 23
    Davide Di Cillo:

    i think if you write any phone number the iphone should recognize it even without a link…

  24. 24
    Jennifer:

    Yeah – it does seem to do that. I got an iphone in July, so not sure if it always did that. I do know that on my old verizon flip phone, it wouldn't recognize phone numbers (REALLY crummy browser on that thing) (which is what why I had started this post originally). But now that I have an iphone, I cant test if the tel: would work or if it has to be the wtai: method. iPhone would probably recognize either now…

  25. 25
    Web Design Contractor:

    I've been studying this as of late, has anybody determined if the iphone can pick up the wtai and make it clickable to dial?

    Jennifer, are you able to click on this link and dial it on your iphone?

    906-555-1212

    . . . and can you click on this add to contacts link and make it work on your iphone?

    Add to Your Contacts

    I would really appreciate it if someone with an iphone could do this test for me and if anyone can tell me if either/or link does not work on their phone.

  26. 26
    Ralf:

    Hi, I'm also searching for a way to let the iPhone dial a number from a web page, so I'm currently testing some methods on the iPhone.
    It's correct that the iPhone (at least the 3G) converts strings which look like a phonenumber into dialable links. Clicking them opens a popup with the option to call that number or to cancel the action. This works only if they are not part of an existing hyperlink within the page.
    The tel: method works fine on the iPhone with the same popup, but unfortunately the wtai: methods lead to an error (page can't be opened).

  27. 27
    Web Design Contractor:

    How does the iPhone handle a link like the one below? Does it show an error screen Ralf or Jennifer?

    <a href="wtai://wp/mc;2065551212" href="tel:2065551212">206-555-1212</a>

    206-555-1212

    I know that the code is screwed up, but does it work? Someone posted this on another forum.

  28. 28
    Web Design Contractor:

    Hello Everyone,

    I just met someone with an iPhone to try out the above link that tried to merge the two href references and she said it would not work on her iPhone.

    - Michael

  29. 29
    aequalsb:

    on my iPhone (pre 3g iPhone – OS version 2.2.1 (5H11))

    —- NO "wtai:" method DID NOT work. which is to REALLY say that SAFARI gave an error message of:
    "Cannot Open Page
    Safari cannot open the page because the address is invalid.
    OK"
    so, theoretically, a different browser might work fine. but until Apple allows browser competition (that aren't reskinned Safaris) on the iPhone, it still basically says "did not work on the iPhone"

    —- YES "tel:" DID work on my iPhone

    —- YES raw phone number numbers were formatted for clickability automatically

    —- YES copyright dates (####-####) were clickable as phone numbers (yuck). BUT… when formatted with an – instead of a hyphen (####–####) they were NOT clickable. so, the workaround is VERY simple (for sites you work on at least)

  30. 30
    aequalsb:

    that is to say ####&ndash;####

  31. 31
    aequalsb:

    looks like browser detection is the only real workaround…. *sigh*

    found this –> nice and clean, easy usage
    http://detectmobilebrowsers.mobi/

    but this was better in many ways – it uses built-in WordPress browser detection
    http://www.nathanrice.net/blog/browser-detection-and-the-body_class-function/

Leave a Reply

Categories

Archives

Bookmarks

WordPress Resources

Meta

ADVERTISEMENTS