Discussion:
JQuery + TableSorter + TableSorterPager + (Container != Div) = undefined error
BigDogInCA
2008-02-20 00:11:40 UTC
Permalink
Greetingz All!

Instead of ( http://pastebin.com/m217e5395 ):

<div id="pager" class="pager">
<form>
<img src="../addons/pager/icons/first.png" class="first"/>
<img src="../addons/pager/icons/prev.png" class="prev"/>
<input type="text" class="pagedisplay"/>
<img src="../addons/pager/icons/next.png" class="next"/>
<img src="../addons/pager/icons/last.png" class="last"/>
<select class="pagesize">
<option selected="selected" value="10">10</option>
<option value="20">20</option>
<option value="30">30</option>
<option value="40">40</option>
</select>
</form>
</div>

I'm Using ( http://pastebin.com/m25926207 ) :

<div id="pager" class="pager">
<form>
<table>
<tr>
<td><img src="../addons/pager/icons/first.png" class="first"/></td>
<td><img src="../addons/pager/icons/prev.png" class="prev"/></td>
<td><input type="text" class="pagedisplay"/></td>
<td><img src="../addons/pager/icons/next.png" class="next"/></td>
<td><img src="../addons/pager/icons/last.png" class="last"/></td>
<td><select class="pagesize">
<option selected="selected" value="10">10</option>
<option value="20">20</option>
<option value="30">30</option>
<option value="40">40</option>
</select></td>
</tr></table>
</form>
</div>

Everything Seems to work, Table gets updated, page display gets
updated, however I'm getting:

Line: 46
Error: 'undefined' is null or not an object.

function moveToNextPage(table) {
var c = table.config;
c.page++; // <--- Line 46
if(c.page >= (c.totalPages-1)) {
c.page = (c.totalPages-1);
}
moveToPage(table);
}

Anyone have a thought?

~ BigDog
BigDogInCA
2008-02-20 14:58:19 UTC
Permalink
Got it resolved thanks to Daemn in the #Jquery channel on
irc.freenode.net!

~ BigDog
Michael Furmedge
2010-01-29 11:09:56 UTC
Permalink
~ BigDog

I really wish you'd posted a clue to how you fixed this BigDog, I'm been
wrestling with it for hours :(
--
View this message in context: http://old.nabble.com/JQuery-%2B-TableSorter-%2B-TableSorterPager-%2B-%28Container-%21%3D-Div%29-%3D--undefined-error-tp15580200s27240p27370491.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.
rasi
2010-02-15 11:39:17 UTC
Permalink
I don't know if this will solve the problem to you, but it did to me. I just
changed my script from something like:

$(document).ready(function() {
$("table")
.tablesorter({widthFixed: true, widgets: ['zebra']})
.tablesorterPager({container: $("#pager")});
});

to

$(document).ready(function() {
$("#tableid")
.tablesorter({widthFixed: true, widgets: ['zebra']})
.tablesorterPager({container: $("#pager")});
});

and, of course, added a new id="#tableid" to my table.
--
View this message in context: http://old.nabble.com/JQuery-%2B-TableSorter-%2B-TableSorterPager-%2B-%28Container-%21%3D-Div%29-%3D--undefined-error-tp15580200s27240p27592483.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.
Loading...