PDA

View Full Version : Problem with simple AJAX update



elmo
1 May 2007, 3:08 AM
I am trying to update an element created from <div id="msg"> with AJAX.
I tried:
msg.load({url:'AJAXgrid.php'});
and also:
var mgr = msg.getUpdateManager();
mgr.update('AJAXgrid.php');

'AJAXgrid.php' contains a simple 'echo something' which works when I run it alone (I am using Apache server).

The problem is that it keeps showing "loading..." forever.
I know it finds 'AJAXgrid.php' cause when I changed the file name it didn't even show "loading". But it seems the response never comes.
What am I doing wrong?

tryanDLS
1 May 2007, 7:10 AM
Use firebug to see what's happening with the request and response. Changing the web page won't change the behavior of the loading indicator. The loading indicator is enabled before the actual page request is made, so it has no way of knowing that the page is valid or invalid.