Calling phone numbers from web page – iPhone and Android

Ever wandered how to call a person’s number from your mobile phone browser by clicking a link or by pressing some button in your web page. Here is a quick example of how to call a phone number from your HTML page. The same technique works fine for both iPhone and Android’s web kit browsers.

From HTML (hyperlink)

<a href="tel:555-678-1234">Click to call</a>

From JavaScript

  function call() {
      window.location.href = 'tel:555-678-1234';
  }

And then you can add your custom styles using CSS. Pretty simple but very effective sometimes.

2 thoughts on “Calling phone numbers from web page – iPhone and Android

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s