I\'m developing a web application that will be launched from a desktop icon on an iPad as a full-screen application. The Apple documentation on phone links recommends using
The meta tag will work:
<meta name="format-detection" content="telephone=no" />
It's the Safari browser not showing your updated page correctly. Make some other text change to the page and refresh and the changes will appear. Just adding the meta tag will still show the page with the number interpreted as a telephone number if you already viewed it that way.
ok, fixed it.. add an <a href link>
and style it with no text-decoration... I was using the asp:hyperlink control in asp.net and it worked on 3.2, so not sure why it stopped in 4.2, but using a standard a link works.
Put this after tel link load
if (navigator.userAgent.match(/(iPhone|Android|BlackBerry)/)) {
//this is the phone
} else if (navigator.userAgent.match(/(iPod|iPad)/)) {
$('a[href^=tel]').click(function(e){
e.preventDefault();
});
} else {
//this is the browser
$('a[href^=tel]').click(function(e){
e.preventDefault();
});
}
The meta tag works for me in asp.net. My guess is that it did not work for the OP because the HTML is not well formed. Non-IE, Mozilla browsers have issues with malformed XML/Html. Change
<meta name = "format-detection" content = "telephone=no">
to
<meta name = "format-detection" content = "telephone=no" />