I've done some more testing.
When I change the success-line to...
success: function(txt){alert(txt);}
it works brilliantly without any hickups.
This makes me feel like it's not the AJAX causing the troubles rather the
append of data.
Could this be it and are there any ways to avoid it?
- Matias Oberg
Matias Oberg wrote:
>
> Hi,
>
> Please excuse my ignorance. I'm totally new to this.
> I'm trying to get some data from a PHP-script via AJAX.
>
> $(document).ready(function(){
> $("a#'. $catid .'").click(function(){
> $("#ajaxloadimage").ajaxStart(function(){
> $(this).show();
> });
> $.ajax({
> type: "POST",
> processData: true,
> dataType: "html",
> url: "getallfromcategory.php",
> data: "uid='. $cat_result['uid'] .'",
> success: function(txt){$("#show_'. $catid
> .'").append(txt);}
> });
> $("#ajaxloadimage").ajaxStop(function(){
> $(this).hide();
> });
> $("#show_'. $catid .'").ajaxSuccess(function(){
> $(this).slideDown("slow");
> });
> });
> });
>
> It works nicely in IE.
> When I try in FF it works kinda.
> When the PHP-Script only returns a small amount of data it's fine.
> But when larger amounts of data gets retreived FF just hangs indefinite.
>
> What am I doing wrong?
> Could someone please advice on what I should do?
>
--
View this message in context:
http://www.nabble.com/Newbie-Alert%3A-Problem-with-Ajax-tf3290902.html#a9178412
Sent from the JQuery mailing list archive at Nabble.com.
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/