[jQuery] Re: AJAX Callbacks - How to show Ajax request status using a loading image?

2008-11-10 Thread Isaak Malik
Hey there, You're using it partially in the wrong way. 1st: function showUser(str) { $('#content1').load(select.php?q=+str); } No syntax mistake in the code above! But the bad part is this: $().ajaxSend(function(r,s){ $(#content1).load(Loading data, please wait...); }); Which will

[jQuery] Re: AJAX Callbacks - How to show Ajax request status using a loading image?

2008-11-10 Thread Shannon
Hello Isaak, Thank you for your kind reply. I tried this code: function showUser(str) { $('#content1').load(select.php?q=+str); $('#content1').ajaxSend(function(e,r,s) { $(this).html('Loading data, please wait...'); } } but it caused the AJAX request to stop working. When I remove

[jQuery] Re: AJAX Callbacks - How to show Ajax request status using a loading image?

2008-11-10 Thread Isaak Malik
Place this part of code outside your function and inside the jQuery on-DOM-ready function: $(function() { $('#content1').ajaxSend(function(e,r,s) { $(this).html('Loading data, please wait...'); } }); Note that your functions must not be inside the on-DOM-ready function. So your