If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

If you convert the string text to a number, and then do the comparison you should get the correct sort order. This will only work for numeric strings though. If you have a mix of numbers and letters in each OPTION, you'll still need to do a string comparison.

Also, the return values for the sort method really should be -1, 1 and 0 (zero being both A and B are equal).