right now i have this code using phonegap and jquerymobile
$( '#user_detail' ).live( 'pageinit',function(event) {
$.ajax({
url: 'http://localhost/get_user.php',
success: function(txt) {
$("#details").append(txt);
}
});
}
However, when data is updated server side, the changes isn’t reflected. Anyone can point me what is wrong? Is it because of caching as i have tried to set cache as false on ajax.
If the android application is closed and open, data is populated
Edited,
Right now, once phonegap application is loaded, it gets all the data onto #details however when there is changes to on get_user.php the data is not reflected and i have to close the application and reopen back in android for the changes to be updated.
What should i do in order for it to automatically populated as in if I move to other page and forth back and the data should be there.
Thanks.
Your question is quite confusing, I can’t able to know whether you data is not reflected or your code changes in get_user.php is not reflected.
But I guess problem is a event you have used. use
pageshowevent instead ofpageinit, I think it will resolve your issue.