I'm a bit confused by your method, as its going to recurse every 5 seconds.

But regardless of that, have you thought of using a callback on your ajax?

$.ajax({url:'blabla',data:'param1=value',success:dothis});

function dothis(results)
{
    $('#xyz').html(results);
    do_something_else(results);
}

-----Original Message-----
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of optimalcapacity
Sent: Monday, February 11, 2008 7:17 AM
To: jQuery (English)
Subject: [jQuery] IE/FF Memory Leak


I am a newbie to jQuery so this may be a simple answer...

My goal in this exercise is to return a specific html table block
(table.DetailTable) from a dynamically generated html page which is
the result of a servlet call into a div (xyz).  The issue I am having
is that whether I set the timer interval to 1 second (1000) or 30
seconds (30000), this code is leaking horriblly.  I verified the leak
in both IE6 and FF 2.0.0.12.

Here's the abbreviate code snippet that I'm working with:

function loadMyData(){
var t;
$("#xyz").load("http://URL table.DetailTable",{Param1:"Param1Value"});
                        t = setTimeout("loadMyData()", 5000);
                }

$(document).ready(
        function(){
                loadMyData();
        }
);

Any help with this issue is very much appreciated!

Reply via email to