I use php for web building . my html table sorting ( js ) not working .
it is working in other table but not working in my php page .

Recommended Answers

All 3 Replies

What kind of help do expect with a vague question like that?
Here's an equally vague answer: You have a code error somewhere...

Sorry to pounce on you, but please understand that we are not looking over your shoulder or telepathic. Questions should be concise and preferably accompanied by the problematic code.

You are not alone. I see this kind of nebulous posting here all of the time.
There is an "art" to asking a question in such a way that you will get a clear, helpful
answer in return.

most javascript table sorters rely on the tab le being given a class='sortable' (or similar)
and <th> elements have to be in the first row of the table to be clicked upon to sort
often requires a

echo "<tr><th>column1</th><th>column2</th><th>column3</th>";
."...<th>column999</th></tr>";

be added before the generated output rows to give the required column headers
but
read the instructions and make sure the table generated by php matches the format required by your sortable.js,

It may be good sometimes to avoid table sorting using javascript. Nevertheless if you have expertise in javascript, you may start from the examples as shown on the library site, not from your own code. Modify on same page with your code and see if it works. There should not be issue.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.