I'm probably missing something major in how this should work, but I'm stuck
so here's the question:

JQuery code in file dataTableHandler.js:

jquery.dataTableHandler = function(param1, param2, param3) {

$.ajax({
    method: "post",
    data: ({newparam1: param1, newparam2: param3}),
    urL: "../somepath",
    success: function(returnedData) {
        $("someDiv1").html(returnedData);
    },
    complete: function(xhr, status) {
        $.("someDiv2").bind("click", function(e) { 
            dataTableHandler(param1, param2+1, param3)         <!-- here is
the problem
        });
    }
});

}  
 
After successfully invoking the function from the jsp/html page I get an
exception (visible in the Firebug) that says "dataTableHandler is not
defined". I tried a lot of stuff to solve this, among others replacing
$.ajax() with $.get(), but the exception is always on the marked line.

What am I missing? How can I make a function bind itself (recursive!?) to
some html element?
-- 
View this message in context: 
http://old.nabble.com/Function-to-bind-itself-to-some-element-tp26252246s27240p26252246.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to