Hi
I have created a test app with 2 pages: main.mobi and page1.mobi.
On second page I have a button with the link: javascript:getDataFromServer();
In the main_custom.js I have defined this function using jQuery’s method
$(‘m1-page1-text1’).load(‘www.myserver.com/getdata.php’); this actually does an Ajax call an updates the HTML of the text1 div.
I have also set the application as Offline App and configured the manifest file with correct mime type.
Then I have uploaded the HTML files to my webserver http://www.myserver.com.
Testing:
Calling the App with Safari browser works perfectly. The AJAX call properly loads the data into the text1 div on page1.
Calling the App on iPhone, added to Homescreen, the AJAX call does not work any longer.
Is the JQuery’s load() method not OK for this purpose?
How can I combine an offline App (for some pages using the cache) and still using ajax calls for getting some actual data, if the user is online?
thanks a lot and regards,
Janosh