Error on fnUpdate

Error on fnUpdate

mruivomruivo Posts: 7Questions: 0Answers: 0
edited January 2011 in General
Hello hello,

I'm trying to dynamically update a row with this code:

[code]
var node = oTable.fnGetPosition(jQuery("div.rowTarget:contains(" + target + ")").parent().parent());
oTable.fnUpdate(newContact[0], node);
[/code]

But am getting the JavaScript Error: "Uncaught TypeError: Cannot call method 'toUpperCase' of undefined". My selector is sound, using .text() at the end of it shows exactly what's in the TR.

What am I doing wrong?

Replies

  • mruivomruivo Posts: 7Questions: 0Answers: 0
    [code]var index = oTable.fnGetPosition($("div.rowTarget:contains(" + target + ")").parent().parent()[0]);
    oTable.fnUpdate(newContact[0], index);[/code]

    Figured it out. I was looking at some other examples, and I just needed to put "[0]" beside the jQuery selector thing. What this actually means is beyond me, but hey it works!
This discussion has been closed.