Hi guys, so i'm making this dynamically created table. Each row has checkbox.
The table is sortable and i'm going to use tablesorter's pager plugin in it.
I want to limit the number of the checked checkboxes to 7. So i wrote
another havascript to control this. When the user checked 7 checkboxes all
the other checkboxes will be disabled until the user remove a checkbox. This
is roughly the pseudocode (cant show the actual code since its for work):

<Script> 
function limitCheckbox(checboxes){

...Some codes to count the number of checkboxes, im passing in the array of
checkboxes
}
</script>

<form>
<table id>
<thead>
  <tr>
     <th>Column1</th>
     <th>Column2</th>
  </tr>
</thead>
<tbody>
<% for (query q: queries>{ %>
     <td><input name = "Checkboxes[]" type="checkbox"
onclick="limitcheckbox(this.form.checkboxes[])"> content </td>
    <td>content 2</td>
<tr>
<tr>
</tbody>
</table>
</form>

This works when i just use tablesorter. The onclick event this
this.form.checboxes will send the whole table. The problem is when i
implement tablepager; the event will only send the current page of the table
instead if the whole table which just made the limitcheckbox function works
on one page and not the other page. So for example, i checked 7 boxes on
page one, the rest of the checkboxes in page one will be disabled, but not
the rest of the pages. OR i checked a couple box on page one, another couple
on other pages, even though it is already 7 total all across the pages if
there are no 7 checkboxes in one page, the javascript wont trigger

so im guessing my question will be:

when you use tablepager how do you send the whole table instead of just the
current page to the javascript?

Any help will be greatly appreciated!
-- 
View this message in context: 
http://www.nabble.com/Tablesorter-Tablepager-problem%2C-desperate-for-help-tp19365140s27240p19365140.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to