WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • jQuery »
  • [solved] Tablesorter plugin
  • Print
Pages: [1]   Go Down

Author Topic: [solved] Tablesorter plugin  (Read 28730 times)

Sander

  • Guest
[solved] Tablesorter plugin
« on: August 06, 2010, 10:31:36 AM »
Hi all,

Are there any known problems using the jQueryAdmin tool and the tablesorter plugin in combination with IE8?

In all other browsers the plugin works fine (Firefox, Opera, Chrome, IE6 and IE7) but in IE8 I get a Javascript error:

Error: 'type' is empty or not an object
This is an error in the jquery.tablesorter. min.js file and it is in the line:

function getCachedSortType(parsers,i){return parsers.type;};

When I run IE8 in the compatibility modus there's no problem.

Does anybody have any idea what there can be wrong?
« Last Edit: August 16, 2010, 09:17:27 AM by Sander »
Logged

Offline BlackBird

  • Posts: 2573
Re: Tablesorter plugin
« Reply #1 on: August 06, 2010, 11:10:20 AM »
Try to use the plugin without jQueryAdmin to see if it is caused by the plugin itself. If it is, try to get support from the Tablesorter Homepage. http://tablesorter.com/
Logged
http://wbaddons.webbird.de Don't miss this

Sander

  • Guest
Re: Tablesorter plugin
« Reply #2 on: August 06, 2010, 11:35:04 AM »
Already did that. There's still the same problem. I've searched the internet, the Tablesorter Homepage, the jQuery forum but nothing helps for now. There must be someone with the same problem I hope...
Logged

Offline BlackBird

  • Posts: 2573
Re: Tablesorter plugin
« Reply #3 on: August 06, 2010, 01:43:16 PM »
Hm. As the last version is of March 2008 (see http://tablesorter.com/changelog), while IE8 was released some time in 2009, this may causes the problem. Unfortunately, I am no JavaScript programmer, so I'm afraid I'm not able to help.

Edit: The demo page (http://tablesorter.com/docs/index.html) works with IE8. Dunno what's the problem. I did not pack this plugin for JQA. Maybe you should check the settings made in the default.preset file.
« Last Edit: August 06, 2010, 02:35:20 PM by BlackBird »
Logged
http://wbaddons.webbird.de Don't miss this

Sander

  • Guest
Re: Tablesorter plugin
« Reply #4 on: August 12, 2010, 09:40:38 AM »
I will, but I can't find the problem yet.

Also saw the demo working on IE8.. Just have to search further..

Thanks for your answers!
Logged

Offline pcwacht

  • Posts: 2923
  • Gender: Male
    • Dutch ICT info
Re: Tablesorter plugin
« Reply #5 on: August 12, 2010, 11:45:23 AM »
Maybe this page helps : http://www.scholenmarktamersfoort.nl/nieuw/pages/alle-scholen-op-een-rij.php (Dutch sorry)
There I use a jquery tablesorter, not plugged in through jquery admin though!
Used jquery files: jquery-1.2.6.min.js, jquery.tablesorter-2.0.3.js, jquery.tablesorter. filer.js, jquery.tablesorter. pager2.js

It works like a charm in every tested browser.

Can give yout he files if needed.

John
Logged
http://www.ictwacht.nl = Dutch ICT info
http://www.pcwacht.nl = My first
both still work in progress, since years.....

Sander

  • Guest
Re: Tablesorter plugin
« Reply #6 on: August 12, 2010, 12:45:32 PM »
Nederlands snap ik ook wel ;-)

Het zit zoals ik het nu kan beoordelen in de soort data (platte tekst, html, formulier) die in de verschillende cellen wordt geplaatst.

In English:
I think the problem occurs because of the data type in the table cells.I have to set the textExtraction to 'complex'. Maybe that helps.. Doesn't solve the problem.
« Last Edit: August 12, 2010, 01:26:24 PM by Sander »
Logged

Sander

  • Guest
Re: Tablesorter plugin
« Reply #7 on: August 12, 2010, 04:31:18 PM »
[UPDATE]

It seems like tablesorter don't recognize all columns (only the first two) of the table. So the columns which can be sorted are not recognized as built-in sorters, so that where the JS error comes from, I think.
Logged

Offline BlackBird

  • Posts: 2573
Re: Tablesorter plugin
« Reply #8 on: August 12, 2010, 04:36:16 PM »
I think it works with the headers.

"tablesorter works on standard HTML tables. You must include THEAD and TBODY tags" (http://tablesorter.com/docs/index.html#Getting-Started)

Maybe you should take a deeper look at the Examples page to see what's "wrong" with your table.

It's a bit like "fishing in muddy waters" without having insight into the table page. :roll:
Logged
http://wbaddons.webbird.de Don't miss this

Offline BlackBird

  • Posts: 2573
Re: Tablesorter plugin
« Reply #9 on: August 12, 2010, 05:33:36 PM »
I've upgraded the plugin for JQA 2.x to be configurable in the backend. Won't fix the problem I'm afraid, but maybe helps playing around with the settings.

[gelöscht durch Administrator]
Logged
http://wbaddons.webbird.de Don't miss this

Sander

  • Guest
Re: Tablesorter plugin
« Reply #10 on: August 13, 2010, 02:08:18 PM »
No it won't fix the problem.

It has to do with the data-type in the cells I think. Below the page where the table doesn't sort in IE8.
FF, Opera, Chrome all don't have problems with the sorting...

Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
<script src="../modules/jqueryadmin/jquery-core/jquery-core.min.js" type="text/javascript"></script>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
       <meta name="Keywords" content=""/>
<meta name="Description" content=""/>
        <script type="text/javascript" src="../modules/jqueryadmin/plugins/tablesorter/jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="../modules/jqueryadmin/plugins/tablesorter/jquery.tablesorter.pager.js"></script>
<script type="text/javascript">
$(document).ready(function()
    {
         $("#resultaat").tablesorter({widgets: ['zebra'],
        // pass the headers argument and assign a object
        headers: {
            // assign the first column (we start counting zero)
            0: {
                // disable it by setting the property sorter to false
                sorter: false
            },
            // assign the second column (we start counting zero)
            1: {
                // disable it by setting the property sorter to false
                sorter: false
            },
            // assign the third column (we start counting zero)
            2: {
                // disable it by setting the property sorter to false
                sorter: false
            },
            // assign the sixth column (we start counting zero)
            5: {
                // disable it by setting the property sorter to false
                sorter: false
            },
            // assign the seventh column (we start counting zero)
            6: {
                // disable it by setting the property sorter to false
                sorter: false
            },
            // assign the eighth column (we start counting zero)
            7: {
                // disable it by setting the property sorter to false
                sorter: false
            },
            // assign the ninth column (we start counting zero)
            8: {
                // disable it by setting the property sorter to false
                sorter: false
            },
            // assign the tenth column (we start counting zero)
            9: {
                // disable it by setting the property sorter to false
                sorter: false
            }
        },
        debug: true
        });
    }
);
</script>
<link rel="stylesheet" href="../modules/jqueryadmin/plugins/tablesorter/blue/style.css" type="text/css" />
</head>
<body>
<table class="tablesorter" id="resultaat" width="98%">
  <thead>
<tr>
<th><b>Afb.</b></th>
  <th><b>Artikelnummer</b></th>
  <th><b>Omschrijving</b></th>
  <th><b>Bruto</b></th>
  <th><b>Netto</b></th>
  <th><b>Staffel</b></th>
  <th><b>Vrd</b></th>
  <th><b>Levertijd</b></th>
  <th><b>Aantal</b></th>
  <th></th>
  </tr>
  </thead>
  <tbody>
  <tr>
<td><form action="" method="post">
   <a href="#"><img src="29500030.jpg" width="30px"></a>
</td>
<td>artikelnummer1</td>
<td><div>artikelomschrijving1</div></td>
<td>&euro; 18,00</td>
<td>&euro; 9,00</td>
<td></td>
<td>14</td>
<td align="right">Aantallen en levertijd1</td>
<td><input type="text" name="aantal" value="1" size="2" onfocus="this.select();" /></td>
<td><input type="submit" name="cart" title="Toevoegen" value="" /></form></td>
</tr>
<tr>
<td><form action="" method="post">
   <a href="#><img src="29500505.jpg" width="30px"></a>
</td>
<td>Artikelnummer2</td>
<td><div>artikelomschrijving2</div></td>
<td>&euro; 33,00</td>
<td>&euro; 16,50</td>
<td></td>
<td>2<br>17</td>
<td align="right">Aantallen en levertijd2</td>
<td><input type="text" name="aantal" value="1" size="2" onfocus="this.select();" /></td>
<td><input type="submit" name="cart" title="Toevoegen" value="" /></form></td>
</tr>
  </tbody>
  </table>
</body>
</html>
« Last Edit: August 13, 2010, 02:11:15 PM by Sander »
Logged

Offline pcwacht

  • Posts: 2923
  • Gender: Male
    • Dutch ICT info
Re: Tablesorter plugin
« Reply #11 on: August 13, 2010, 03:11:01 PM »
Set the form tags outside the tabel!

This might do the trick
Allso you can test woithout the form tags first to see if it'll work.

Good luck hunting!
John
Logged
http://www.ictwacht.nl = Dutch ICT info
http://www.pcwacht.nl = My first
both still work in progress, since years.....

Sander

  • Guest
Re: Tablesorter plugin
« Reply #12 on: August 13, 2010, 03:34:51 PM »
That does the trick!!!

Thanks a lot!!

I inserted the <form> tag in the last cell and then there's no problem. All sorter types are recognized and the table is sortable.

Thanks a lot again!
Logged

Offline BlackBird

  • Posts: 2573
Re: Tablesorter plugin
« Reply #13 on: August 13, 2010, 03:41:38 PM »
Best way is to put the opening <form> before the opening <table> and close the form after </table>, if the form includes the whole table. (Did not analyze if it does in this case.)

Also, make sure to nest the HTML tags right. It's not valid to open the form in one TD and close it in another one.

INVALID
<tr><td><form..>...</td><td>...</td><td></form></td></tr>

VALID
<tr><td></td><td>...</td><td><form..>...</form></td></tr>

I'm happy you solved your problem. :-D
Logged
http://wbaddons.webbird.de Don't miss this

Offline pcwacht

  • Posts: 2923
  • Gender: Male
    • Dutch ICT info
Re: Tablesorter plugin
« Reply #14 on: August 13, 2010, 04:03:46 PM »
See how posting code helps us helping!!

Have fun,
John
Logged
http://www.ictwacht.nl = Dutch ICT info
http://www.pcwacht.nl = My first
both still work in progress, since years.....

Sander

  • Guest
Re: Tablesorter plugin
« Reply #15 on: August 13, 2010, 04:48:20 PM »
Indeed.

Each row is a form, so the form tags can't be outside the table. Now I have a valid form nested in one <td>

I'm happy also  8-)
Logged

Offline BlackBird

  • Posts: 2573
Re: Tablesorter plugin
« Reply #16 on: August 14, 2010, 10:38:25 AM »
I'm happy to hear that. Maybe you'd like to add [solved] to the subject line of the first posting. :wink:
Logged
http://wbaddons.webbird.de Don't miss this

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • jQuery »
  • [solved] Tablesorter plugin
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2