views:

177

answers:

2

Hello,

I've got a table which Im sorting with tablesorter (http://tablesorter.com). Within that table there is a column with submit buttons. Each table row has got a submit button. Before sorting, the buttons work great and submit a POST request which is processed by a PHP script.

AFTER sorting the table with tablesorter the buttons seam to be deactivated. They behave as if a JavaScript returns false. That means, that no page refresh happens.

Can someone help me, that a can still submit after sorting?

Thanks a lot, Max

+1  A: 

Show us the code (here or via something like pastebin.com) for the real answer. Barring that, my best guess is that sorting the table is moving the buttons outside of the "form" tags that make them operate. Whether my guess is totally wrong or not, the first thing I would do is use FireBug to examine the elements after the table is sorted and see what's wrong.

andy
thanks andy! U were right! the buttons went outside the form. I solved it by moving the form tag somewhere else! So thanks again!
Max
+1  A: 

My guess would be that the tablesorter plugin is adding/removing elements from the DOM. When this happens the event handlers are being removed. You might want to try adding the event handlers with the live method. This should allow them to be applied (assuming they are click handlers) even when the elements are removed/added.

tvanfosson