View Full Version : Mobile Development Question (Jquery, ajax, html5 related)

08-04-2010, 02:45 AM
What would be the best way to get data for a mobile site. I've tried using Jquery $.ajax to bring in the data from a php file.

It seems to work however it takes some time to load without a way to really give a progress meter. I was wondering what the fastest way to do this would be. For instance it loads and loads then after a long while the alert(); pops up and the data loads into the page.

Ultimately i was thinking i could use the ajax request to read in the data from the mysql database server, then transfer it to localstorage, im using HTML5 primarily for the development also just for reference.

Somewhat new to mobile development i was just wondering if anyone had a starting point for me to look at and go from there.

var dataret = 0;

type: 'POST',
url: 'mobile.php',
beforeSend: function(){
success: function(data){
//initialize localstorage here

// if it takes as long as it does, a few minutes, at least show a loading bar...


dataType: 'json'


Thanks in advance!

08-04-2010, 03:07 AM
There should seriously be just a forum area or whatnot to post where nobody sees, because as soon as i post, i almost always go to the next step immediately and somehow figure it out... As if the universe wants me to make a fool of myself... the above method works thanks