Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7529835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T04:45:07+00:00 2026-05-30T04:45:07+00:00

I’m using jQuery Tablesorter plugin, it works fine. However there is a problem. Imagine

  • 0

I’m using jQuery Tablesorter plugin, it works fine. However there is a problem. Imagine that you have some sorting order, but you want to live the page and come back shortly. Unfortunately when you come back you will get the initial sorting order which is simply wrong. So I was trying to find a clue how to save the state of Tablesorter (remember the sorting choice when leaving the page) in some variable and pass it via URL using _GET in php. Any ideas and help will be appreciated.

I did a little research and found out the following:
1.You can read the current sortlis

     <script>
    $(window).unload( function () {   
    var sortList;  
    $(table).tablesorter().bind("sortEnd", function(sorter)   
    {      
        sortList = sorter.target.config.sortList;  
        $_GET['sortList'] = sortList;  
    });   
    }  
    );
    </script>

2.I’ve tried to save the sortlist like above and read it when page loads:

<script>  
$(document).ready(function()   
    {   
        sortList=$_GET['sortList'];  
        $.tablesorter.defaults.widgets = ['zebra'];   
        $.tablesorter.defaults.sortList = [[1,0]];   
        $("table").tablesorter();   
    }   
);      
</script>
  1. Doesn’t work, I think these 2 lines are questionable:

    sortList=$_GET[‘sortList’];
    …
    $_GET[‘sortList’] = sortList;

I’m mixing here languages JavaScript with PHP and data types. But I’m not a professional programmer and I can’t connect the dots. Any help?

Alex

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T04:45:09+00:00Added an answer on May 30, 2026 at 4:45 am

    I have a fork of the tablesorter plugin on github and I wrote a widget called “saveSort” (demo) which stores the last sort into localStorage if the browser has HTML5 or into a cookie as a fallback.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have thousands of HTML files to process using Groovy/Java and I need to
I have some data like this: 1 2 3 4 5 9 2 6
I'm new to using the Perl treebuilder module for HTML parsing and can't figure

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.