Question

Is it possible through javascript to read the number from the iphone. Lets say i have a html page where they have to fill in the gsm number, can javascript read the number from the phone and fill the form with it?

Was it helpful?

Solution

From JavaScript, it's not possible. Actually, the iPhone itself might not know it at all, as the phone number is not necessarily stored on your SIM card.

OTHER TIPS

It should be noted that if you are writing your own iPhone application, you can use following:

  1. UIWebView class: http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIWebView_Class/Reference/Reference.html

  2. You can have HTML code in the your application bundle (or just anywhere on the web)

  3. You can execute any Javascript on that HTML using this method: http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIWebView_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006950-CH3-SW21

There is a Draft from W3C on System Information API into the Device API section. But it is not yet implmented in any browser.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top