![]() |
jQuery, AJAX and PHP fetching from database
Hello,
I'm working on a mobile app (I'm a total newbie) and I need some help. I'm trying to fetch data from MySQL database and encode it in JSON and then get it with AJAX call in jQuery. HTML: Code:
<ul></ul>Code:
$(document).ready( function() {Code:
include_once('db.php'); |
First of all, you should not call done() from inside the setTimeout callback. You should only call it after the request started by updates() finished, i.e. in its success callback
Second: There must not be a semicolon after the closing bracket of the success callback Code:
$(document).ready(updates); |
| All times are GMT +1. The time now is 06:19 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.