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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:28:13+00:00 2026-05-16T14:28:13+00:00

Once again I need some help. I’m working with a table that contains 3

  • 0

Once again I need some help. I’m working with a table that contains 3 different types of data (time, alpha and numbers), and it is required that the columns can be sorted (ascending or descending) based on the type of data that each column holds.

So far, the JavaScript that I’m using works well as it was written originally, but there is a lot of HTML in each one of the table cells, and it gets to a point in which the js function chokes when there is 2 values in a particular table cell.
Since I was not the one that wrote the function, I’m having a hard time understanding how it really works(I am also not a js expert).
At this point I’ve tried many different things and also different plug-ins and nothing has worked the way I need it, so I’ve decided that the best way for me is to write something from scratch.
I’m not expecting anybody to hold my hand on this one, but I would appreciate if someone with more experience than me helps me understand the logic behind a table sorting function.

For instance:
In my mind, (and probably my logic is flawed, but that is why I came here to ask) what I have to do is define the data type for each table cell, compare the values of each cell based on that data type, somehow grab the entire row for each cell and rearrange the table rows based on the desired order.

I’m ok with jQuery or plain JavaScript.

Thanks in advance for any help that you want to offer.

  • 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-16T14:28:14+00:00Added an answer on May 16, 2026 at 2:28 pm

    It sounds to me the JavaScript is confused about what value to use to sort by in each column. If the JavaScript being used is uncompressed I would make a change to it to use a value within the cell tag that allows you to specify the value you want to sort by:

    <td data-value="15"><strong>15</strong> - Text in here, etc.</td>
    

    If you are using HTML5 you can use data-value. You can substitute -value for what ever you wanted to call the data field. If you aren’t using HTML5 a lot of JavaScript will use the rel HTML value. In this case:

    <td rel="15"><strong>15</strong> - Text in here, etc.</td>
    

    I hope this is helpful. If anything needs clarification or you need more help let me know.

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

Sidebar

Related Questions

Once again, I need some help and I appreciate you all for being here
I need your expertise once again. I have a java class that searches a
I received some great help here the other day and hope once again I
I need some help in resolving an issue I'm facing an with communication of
I'm new to jQuery and need some help to show and hide a div
Once again one of those: Is there an easier built-in way of doing things
Once again a very beginner-ish question, but here I go: I would like to
Thanks to some help on StackOverflow, I am currently animating a path in CAShapeLayer
Hi good people once again While busy traversing, iterating and manipulating my arrays from
Once I've created a variable in the immediate window in C# (VS2008), is there

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.