This is a tough one to create a subject for, but here are the details:
The initial remedy was to check the values and then add and insert accordingly. This did the trick, only if the value and text matched. Sometimes the option value was substitued for an id number (useful with a SQL table), so if the id’s and text’s didn’t sync accordingly by number and alphabetical order, then you’d have a mismatch. So I developed two functions that would take the place according to which the programmer defines. One for Value and one for Text (moveModuleByValue & moveModuleByText).
In the example html file, if you view the source you’ll notice that i’ve mismatched option ‘ad’ to accurately see the differences in the two move methods. Try to move that option back and forth between the two move functions to see it work effectively.
I would have tried to make this just one function, but i was not able to figure out how to interchange the DOM of .text and .value flawlessly. If I have time to hack at it more i’ll figure it out, but this seems to do the job just fine for me.
Comments and suggestions are always welcome.