54
Views
4
Comments
Solved
Does anyone know how to do this?
Question

I want to make it like if I click one of the columns once then movies are sorted in ascending and twice in descending.  If I click once then they are sorted but twice they don't move. 

How do you do it? 

2021-12-23 04-28-09
Navneet Sharma
Solution

Hi,

I have attached the Movies OML file So please find the attachments and 

do Compare with your Code with OML code and find the difference which you have missing.

I hope this will help you


Thanks & Regards

Navneet Sharma

OSMDb.oml
2023-10-21 19-42-11
Tousif Khan
Champion
Solution

Hello

Whar are you trying to achive here, can you please be more specific,

According to sorting criteria that was applied , when you click on a column header it will sort your table according to uour condition but when you click it back it will change back to the default .

When you click twice it wont change because it came back to default

Hope you understand

Best Regards

Tousif Khan

2018-06-05 16-54-03
Maria da Graça Peixoto

It is not a great idea to use "onclick" and "ondbclick" in the same element. The browser on the first click will execute the "onclick" work and then on the second click it will try to execute "ondblclick" work .

2022-02-08 09-40-14
Chandrashekhar Mankar

As mentioned above, if you click it once it basically sorts your table according to the criteria, however on a double click it won't revert back to the previous state as it is already sorted.

But if you still want to implement it, you might want to use Javascript or some other feature.

2021-12-23 04-28-09
Navneet Sharma
Solution

Hi,

I have attached the Movies OML file So please find the attachments and 

do Compare with your Code with OML code and find the difference which you have missing.

I hope this will help you


Thanks & Regards

Navneet Sharma

OSMDb.oml
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.