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 7972839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:57:41+00:00 2026-06-04T07:57:41+00:00

The table will get generated dynamically from the server-side code, which I have to

  • 0

The table will get generated dynamically from the server-side code, which I have to sort based the chosen column from the combo box. I’m having 5 columns totally, includes input elements too…

I have searched for table sorting, but I’m getting the kind of codes which will get triggered when we click on the header. I don’t understand completely how it works. There is no need to reverse the sorting in my case.

I have got TSorter from terrill which didn’t work out well for me. I don’t understand what the mistake I have done…

I must do it with Javascript without using any JS framework. Any help would be appreciated….

My code snippet:

<script>
function init()
{
    var Table1Sorter = new TSorter;
    Table1Sorter.init('TableToSort');
}

window.onload = init;
</script>
<div id="sortElements">
  <table border=0 cellspacing=0 cellpadding=0 >
     <tr>
        <td>Sort By</td>
        <td>
           <select name="sortBy" >
             <option value="0">column 2</option>
             <option value="1">column 3</option>
             <option value="2">column 4</option>
           </select>
     </tr>
  </table>
</div>
<span>
<div id="tableContainer" >
<table id="TableToSort" border=0 cellspacing=0 cellpadding=0 >
<thead>
<tr>
  <th>Column 1</th>
  <th>Column 2</th>
  <th>Column 3</th>
  <th>Column 4</th>
  <th>Column 5</th>
</tr>
</thead>
<tbody>
<!-- My rows-->
</tbody>
</table>
</span>
  • 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-06-04T07:57:42+00:00Added an answer on June 4, 2026 at 7:57 am

    The problem that I had was: I have made the clicking event by calling the event. It was supported in Firefox 9+ and Opera, Chrome are not supporting that event.

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

Sidebar

Related Questions

I have a table of data which is generated dynamically with Javascript. Every few
I have a dynamically generated table that will have an ID. If the table
I have a dynamically generated table in my page, which was generated by a
I want to insert into my table a column named 'S' that will get
I have created an archive table which will store data for selecting only. Daily
What I can think of is: Algo: Have a hash table which will store
I have to generate reports based on various parameters which would be provided dynamically.
I'd like to add a new column to my data.table, which contains data from
Which virtual table will be pure virtual function located? In the base class or
For multitenant databases, to you name tables differently based on: Whether the table will

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.