Skip to content
Advertisement

Javascript to sort contents of select element

is there a quick way to sort the items of a select element? Or I have to resort to writing javascript?

Please any ideas.

JavaScript

Advertisement

Answer

This will do the trick. Just pass it your select element a la: document.getElementById('lstALL') when you need your list sorted.

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement