Sample: Sorting list boxes and drop-down lists (ZIP, 94K)

Use the JavaScript Array object’s built-in sorting function to sort pairs of text and value items at runtime.