I'm missing something basic I think in using the tablesorter function.  

I have an index.php that does the following:
     - sets up my divs, including one called "content" where I want all my
data to go
     - included jquery, superfish.js (menus), data.js, tablesorter, and
tablesorter pager

My data.js file has all my jquery calls - when I click a menu item such as
"Search by Last Name" the fie "by-lastname.html" is loaded into the content
div.  This is a simple form - I type in a last name and click search.  The
form in by-lastname.html calls searchlastname.php - this file contains the
following code:

$("#content")
        .tablesorter({
    widthFixed: true,
    widgets: ['zebra'],
        debug: true
        })
   .tablesorterPager({
                container: $("#pager"),
        positionFixed: false
        });

This file connects to a mysql database, and queries for the appropriate
info. At the bottom of this file I have some includes:  nav.inc (which loads
the menu's), header-table.inc (which prints out the header for the table)
and table.php.  Table.php contains the following info:

echo("<div id = 'data'>");
# now display data itself

echo("<tbody>");
while  ($row = mysql_fetch_array($query))
{
    echo("<tr>\n<td>");
    echo($row["last name"]);
    echo("</td>\n<td>");
    echo($row["firstname"]);
...... rest of the data......and I close tbody, the table and the data div.
At the bottom of this file, I copy everything from the data div to the
content div:
<script type="text/javascript">
   
document.getElementById("content").innerHTML=document.getElementById("data").innerHTML;
</script>


My problem is that the data prints out, but the next and previous buttons
print out at the top of the table, not the bottom.  I have tried the
fixedPosition: true, but that did nothing. The zebra widget is also not
working, which leads me to believe there is more wrong here than I think.  I
have tried debug: true, but that also produces nothing.  Can someone see
what I am doing wrong?  I know I am close, just cannot figure out what is
going wrong.
-- 
View this message in context: 
http://www.nabble.com/tablesorter-and-pager-question---getting-data-from-mysql-tp16767295s27240p16767295.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to