I use the following piece of code to produce a sorted menu. It works fine
on Windows machines but on OS X it results in only one item showing up in
the menu. Anyone have any ideas what the trouble might be?
Thanks, -James
// outer loop begin
...
var added=false;
var numMenuItems = menu.childNodes.length;
for(var i=0; i<numMenuItems; i++) {
if(name.toLowerCase() < menu.childNodes.item(i).label.toLowerCase())
{
menu.insertBefore(tempItem, menu.childNodes.item(i));
added=true;
break;
}
}
if (!added) menu.appendChild(tempItem);
...
// outer loop end
_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners