views:

280

answers:

4

Hi SO,

I need to build a web page for mobile device. There's only one thing I still haven't figured out: how can I trigger a phone call through the clic of an image or text.

Is there a special url I could enter like the mailto: tag for emails ?

Device specific solution are envisagable.

I know Iphone automatically recognise phone number and create a link for this but it would be great if this could be done for images too... and also for most mobile devices.

Thanks !

Fred

A: 

Maybe this works?

<img src="boat.gif" alt="(555) 67893" />
sindre j
+1  A: 

The proper URL scheme is tel:[number] so you would do

<a href="tel:5551234567"><img src="callme.jpg" /></a>
Andrew Koester
+2  A: 

Most modern devices support the tel: attribute. So use <a href="tel:555-555-5555">555-555-5555</a> and you should be good to go.

meme
+1  A: 

The previous answers are inadequate. The best tutorial I have found is here:

http://pointbeing.net/weblog/2010/01/making-phone-calls-and-sending-sms-with-html.html

12345