here's an example pattern for your function:

(function() {

    var request = new Request.JSON({
        url: '/echo',
        link: 'cancel',
        onRequest: function() {},
        onComplete: function (json) {}
        }
    });

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


form_comment(div1);
form_comment(div1);
form_comment(div1);

... or

request.setOptions({
    data: document.id(id)
});

etc - you get the idea.
--
Dimitar Christoff

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

Reply via email to