Getting a Single TR Node Using a Known TR Element ID

Getting a Single TR Node Using a Known TR Element ID

ViktorNachtViktorNacht Posts: 2Questions: 0Answers: 0
edited August 2011 in General
I have a table where each TR has an ID that I've assigned (e.g. ""). I need to update a single row based on the ID, however it looks like I have to use fnGetNodes first to pass a TR node to fnUpdate. How do I get a single TR node based on the ID I assigned to the TR element?

Thanks!

V

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    $('#id')[0]; // where id is the id you assigned

    but using numeric ID's is kind of a no-no in HTML. some browsers might not work well with identifiers that don't start with an alphabetic char or _

    you could make your code easier to understand and more compliant by using ID's like
  • ViktorNachtViktorNacht Posts: 2Questions: 0Answers: 0
    That did it. Thanks. I hear you on the IDs, but I'm going to ignore you and fix it when it breaks, if it breaks. But again, thank you very much for helping me find the node. :)
This discussion has been closed.