Oh, and forgot to say:  Do you *really* mean to be saying "Loading"
when the load fails? ;)

On Mar 8, 3:03 pm, abehrens <[EMAIL PROTECTED]> wrote:
> Greetings
>
> I have a javascript problem concerning a possible memory leak. I am
> using Ajax.Request to get a JSON object from a server and then passing
> the data from the JSON object to a few div's. This is done every
> second, but over time it seems my code leaks somewhere (in the
> browser).
>
> I have racked my brain trying to figure this one out...can anyone tell
> from this snippet what might be wrong:
> new Ajax.Request('getData?time=' + dateTime,
> {
> method:'get',
> onSuccess: function(transport){
> var json = transport.responseText.evalJSON();
> $('statusBanner').update();
> $('Month1').update(responseJSON.Month1);
>
> $('Month1V').update(json.Month1V);
> $('Month2').update(json.Month2);
> $('Month2V').update(json.Month2V);
> $('Month3').update(json.Month3);
> $('Month3V').update(json.Month3V);
>
> $('L1V').update(json.L1V);
> $('L2V').update(json.L2V);
> $('L3V').update(json.L3V);
>
> $('Spread1').update(json.Spread1);
> $('Spread1V').update(json.Spread1V);
> $('Spread2').update(json.Spread2);
> $('Spread2V').update(json.Spread2V);
> $('Spread3').update(json.Spread3);
> $('Spread3V').update(json.Spread3V);
> delete json;
>
> },
>
> onFailure: function(){
> $('statusBanner').update("<h1>Loading</h1>");
>
> }
> });
>
> Many many thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to