Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Webview converting numerics to phone numbers

Let's say I programmatically set the innerHTML of a div called test to 96840664702 and then write javascript…

alert(document.getElementById('test').innerHTML

In Mobile Safari on the iPhone, Firefox, etc., the alert will read "96840664702". If I point webview (using the iPhone emulator or loading a test app onto the iPhone) to the same page, the alert will read:

    <a href ="tel:96840664702" x-apple-data=detectors="true">96840664702</a>

How can I globally disable the data-detectors? I tried a couple meta-tags…

<meta name=”format-detection” content=”telephone=no”>
<meta name="x-" http-equiv="x-rim-auto-match" forua="true" content="none">

… but they didn't work. I couldn't find a reference for a meta tag that specifically mentioned Apple's detectors.

Since it works on the iPhone when I use Safari (vs. as a Titanium app), I assume there's a webview property I don't know about, but there's nothing listed in the API documentation under Titanium.UI.Webview.

— asked April 17th 2010 by Chocolate Asparagus
  • converting
  • data-detectors
  • links
  • numbers
  • tel
  • to
  • webview iphone help
1 Comment
  • try this
    webview.autoDetect = [];

    — commented May 2nd 2013 by Mark Tangpus

0 Answers

The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.