On 08/02/2012 16:04, Sid-ahmed D wrote:
almost perfect ... but I need div name in onComplete for example.

onComplete: function (json) {}
$('form_'+id).dispose();
}

Have you an idea ?

sure. just store a private id that changes on calling the function and reference that in a selector in the onComplete

(function() {

    var disposeid, request = new Request.JSON({
        url: '/echo',
        link: 'cancel',
        onRequest: function() {},
        onComplete: function (json) {}
            var form = document.id("form_" + disposeid);
            form && form.dispose();
        }
    });

    this.form_comment = function(id){
        disposeid = id;
        request.send(id);
    }

})();


--
Dimitar Christoff

"JavaScript is to JAVA what hamster is to ham"
Personal blog: http://fragged.org/ - Twitter: @D_mitar

Reply via email to