How to make a row clickable?

How to make a row clickable?

verlagerverlager Posts: 18Questions: 3Answers: 0
edited May 2009 in General
I tried to make an entire row clickable with:

...

but when I click on a row, nothing happens! Is there a fix for this?

Replies

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    Problem here is that window.location.href isn't a function - it's a parameter :-)

    Try:
    ...

    Thank should do the trick for you. Might also be worth looking at the console output - or even better run Firebug if you have Firefox, Dragon Fly in Opera, Web Inspector in Safari or enable debugging in IE, these should all throw an error for this case, quickly pin pointing the problem.

    Allan
  • verlagerverlager Posts: 18Questions: 3Answers: 0
    Thanks, that worked perfectly.
  • aprapr Posts: 2Questions: 0Answers: 0
    Is it possible to make a row clickable when using serverside/ajax processing?

    PS.- Congratulations and thank you, datatables rocks!
  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    Yup - use fnDrawCallback() ( http://datatables.net/usage#fnDrawCallback ). This function is run on each table draw, so you can add the event handlers there. The other way is you just $.live().

    Hope that helps,
    Allan
  • aprapr Posts: 2Questions: 0Answers: 0
    Thank you very much for your fast reply. Will try both.
This discussion has been closed.