Sorry there is a bug / error in the pastebin ...
I just noticed that it starts with then it calls the
... tags
You will need to take the body tag from the very top and add it
directly after the closing tag..
My bad!...
Also ... tablesorter comes with some CSS to make it look pretty so it
might be an idea to include that in the document too - save using ugly
(and nearly depreciated) tags
On Dec 29, 4:25 pm, "Mark K. Ayler Jr. " wrote:
> Alex,
> Thanks so much. It does look a lot better...and looking through your
> changes, it makes perfect sense. Thanks for doing that.
>
> Are you sure this code belongs in my .php file or should it be in the
> jquery.tablesorter.min.js file?
>
> $(document).ready(function() {
> // call the tablesorter plugin
> $("#results_table").tablesorter({
> // enable debug mode
> debug: true
> });
>
> });
>
> On Tue, Dec 29, 2009 at 5:08 AM, Alex Mcauley <
>
>
>
> webmas...@thecarmarketplace.com> wrote:
> > You have alot of unclosed tags in there ...
>
> > Let me help you out a bit and pastebin how it should look!...
>
> > This should help
>
> >http://pastie.org/759936
>
> > On Dec 28, 6:44 pm, ace123 wrote:
> > > I'm not sure if this is possible...but I love the jquery tablesorter-
> > > but I can't figure out how to get it working. My page displays as if
> > > it's not even there. I used php to snmpget some data from my network
> > > switches and routers. It saves it to my DB...then I have this page to
> > > display the information from the database. This is where I want to be
> > > able to sort, by switch type, software version, etc. I'm not a code
> > > guy, just a network engineer trying to make my job easier. Your help
> > > please is MUCH appreciated. I've been trying to get this to
> > > work off and on for 6 months.
>
> > > This is what I've got so far
>
> > > The page looks something like this when I load it.
>
> > > Host Name Device Type Firmware Version Software Version
>
> > > edge-109c-gs.gov.ntwk 470-24T "3.6.0.7" "v3.7.3.13"
> > > edge-241c-gs.anx.ntwk 470-24T "3.6.0.7" "v3.7.3.13"
> > > edge-399c-gs.anx.ntwk 470-24T "3.6.0.7" "v3.7.3.13"
>
> > >
> > >
>
> > > > > $username="root";
> > > $password="";
> > > $database="switchesdb";
> > > mysql_connect(localhost,$username,$password);
> > > mysql_select_db($database) or die( "Unable to select database");
> > > $query="SELECT * FROM switchcode";
> > > $result=mysql_query($query);
> > > $num=mysql_numrows($result);
> > > ?>
>
> > >
> > > </
> > > script>
> > > <script type="text/javascript" src="/var/www/html/
> > > jquery.tablesorter.min.js">
> > > > > $(document).ready(function() {
> > > // call the tablesorter plugin
> > > $("table").tablesorter({
> > > // enable debug mode
> > > debug: true
> > > });
>
> > > });
>
> > >
> > >
> > >
> > >
> > >
> > > Host Name
> > > Device Type
> > > Firmware Version > > th>
> > > Software Version > > th>
> > >
> > >
> > >
> > > > > $i=0;
> > > while ($i < $num) {
> > > $host_name=mysql_result($result,$i,"host_name");
> > > $device_type=mysql_result($result,$i,"device_type");
> > > $firmware_version=mysql_result($result,$i,"firmware_version");
> > > $software_version=mysql_result($result,$i,"software_version");
> > > ?>
>
> > >
> > >
> > > > ?>
>
> > > > > $device_type; ?>
> > > > > =strstr($firmware_version, "\""); echo ($cleanstring); ?>
> > > > > =strstr($software_version, "\""); echo ($cleanstring1); ?>
> > >
> > >
> > >
> > >
>
> > > > > $i++;}
>
> > > ?>
>
> --
> Mark K Ayler Jr.
> CCNA, MCSE, NNCSS, OASIS.