Using PHP, I browse the directory and list all the XML files. Each XML file contains both a "name" element and a "date" element. The "name" element for each XML file is specified as an option in the selection list. This works great, but the "date" element in each XML file is different and contains a date format, such as: mm / dd / yyyy. What I'm trying to understand how to do this is to sort the items by date, with the earliest date being the first in the list and the very last at the end.
Now let's say that each of these elements has a different meaning for the date element. I need to sort these items with the earliest date. I'm not sure how I can store the data of a date element anywhere so that it can be processed by JavaScript. I am sorry if this is a very vague description, it puzzled me for a while, and it was difficult for me to understand and explain.
UPDATED
So now I am working:
<select name="sel_id" onchange="this.form.submit()" size="20">
<option value="item1">Item 1</option>
<option value="item2">Item 2</option>
<option value="item3">Item 3</option>
<option value="item4">Item 4</option>
</select>
I think one thing that will help a lot is to know if there is a way to save the date somewhere in tags other than the value attribute, seeing how it is already in use. The date itself does not cause concern, I understood it so much, it is just a matter of keeping it somewhere so that it can be called the client side.