cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alf Stockton <>
Subject Retrieve cell phone number
Date Tue, 21 May 2013 13:52:41 GMT
Based on the API at phonegap I have put together the following HTML in a 
test to see if I can retrieve the cellphone number when I browse to this 
html from my cell phone. I have obviously misunderstood something for I 
would expect to see the cellnumber in the cellnumber field on the form 
but no such luck.
I would be grateful for any helpful suggestions.

<!DOCTYPE html>
     <title>Contact Example</title>

     <script type="text/javascript" charset="utf-8" 
     <script type="text/javascript" charset="utf-8">

     // Wait for Cordova to load
         function onDeviceReady() {
         var myContact = navigator.contacts.create({"displayName": "Test 
         document.cellnumber = new ContactField('mobile', 
myContact.cellPhone, true);

     <p>Create Contact</p>
<input id="cellnumber" name="cellnumber" >

Alf Stockton       
Everything will be all right in the end... if it's not all right then it's not yet the end.

View raw message