ringerce
ringerce

Reputation: 533

ie freezes using mootools request.html ajax

this is the method:

    var ajaxRequest = new Request.HTML({
        method: 'post', 
        url: url + "?dt=" + Date(),
        onFailure: function(item) { alert(item.responseText); },
        onRequest: function(item) { gui.preloader('on'); },
        onSuccess: function(html) {
            gui.preloader('off');
            element.set('text', "");
            element.adopt(html);
            if (element.get('html') == "") alert('No Results... Please try again');
        }            
    }).send(formData);

gui.preloader loads a swiff ands sets the visibility accordingly. The problem is that IE locks up in between requests so the animation shows briefly then locks up. Firefox looks fine.

Upvotes: 2

Views: 773

Answers (1)

Eric
Eric

Reputation: 2087

Remember that Request.HTML also parses the HTML into a DOM object which IE sometimes chokes on, depending on complexity. As you're emptying out "element" anyway, I'd recommend trying out just new Request and element.set('html', html').

Upvotes: 1

Related Questions