sorry I can't provide the entire code in context
but this is the basics. After the
insertBefore,
when I check .value of each element, I get 0 for everything
if I use <ol start='0'>, or I get the original values, if I put a
value tag on each LI. I get no reordering.
Is this another one of those stupid IE tricks? I'm using (and stuck with)
IE 6+
Code:
var row = document.createElement('LI') ;
row.id = id ;
row.className = 'flow' ;
row.style.width = width ;
row.innerHTML = newtable ;
var idx = 0 ;
try
{
var children = parent.getElementsByTagName('LI') ;
idx = parseInt(event.getAttributeValue('index')) -1 ;
parent.insertBefore(row, children[idx]) ;
}
catch (err)
{
idx = 0 ;
parent.insertBefore(row, parent.firstChild) ;
}