What's the best way to simulate a troolean variable with an HTML form?
Specifically, I've got a column that is to be sorted, so it can have three states: unsorted, ascending, and descending. I want to store the state in a form so it is recovered after page submission.
Is there an elegant way of doing this?
EDIT
Javascript is encouraged here. Right now my solution is a hidden input, with a value of 0,1, or 2. The value is changed when the sort button is clicked, and submitted with the form. But perhaps there's a better way?
EDIT
This question has apparently already been asked: Tri-state Check box in HTML?. Voting to close.
I find the way the top checkbox of gmail is working rather intuitive:
You don't need an image like the referenced page about the Tristate checkbox.