[jQuery] Re: AJAX return value

2009-06-03 Thread Gustavo Salomé
try this: $.ajax({ url:'mypage.php', data:'item1=1item2=2', success:function(html){ if(html.substr(0,1)==1){ $('#divToUpdate').html(html.substr(1)); } else{ alert('error page'); } } }); 2009/6/4 Dave Roberts dave.a.robe...@gmail.com Hello, I have a page which shows items in a

[jQuery] Re: AJAX return value

2009-06-03 Thread Dave Roberts
Thanks for the quick reply! What would the format of the html be? Like this? 1divreturnstuff/div On Jun 3, 11:36 pm, Gustavo Salomé gustavon...@gmail.com wrote: try this: $.ajax({ url:'mypage.php', data:'item1=1item2=2', success:function(html){   if(html.substr(0,1)==1){    

[jQuery] Re: AJAX return value

2009-06-03 Thread Gustavo Salomé
Yes for success response, like this: 0divstuff/div for error response. 2009/6/4 Dave Roberts dave.a.robe...@gmail.com Thanks for the quick reply! What would the format of the html be? Like this? 1divreturnstuff/div On Jun 3, 11:36 pm, Gustavo Salomé gustavon...@gmail.com wrote: try