Basing the Business on Cloud Computing
Sometime in late 2008, the team here at Fuery Solutions made the decision to base the future of our business on software-as-a-service product targeted at legal professionals.
Read MoreMooTools Users: Implement a Hash.sort method
I notice that Firefox seems to maintain the order of key:value pairs in objects when iterating over them, while Safari and Chrome seem to sort the object internally (within their respective JS engines). I noticed this especially when making select elements. I store the options as an object, then when drawing the page, I iterate over that object making option elements.
For example, I am making a select box that lists users alphabetically. Users are identified in the database by an id:
var foo = new Element('select').inject($$('body')[0]);
var options = {5082:'User A', 5085:'User B', 5074:'User C'}
$H(options).each(function(name,id){
new Element('option', {text:name, value:id}).inject(foo);

Leave a Reply