I'm trying to move a DIV element to before one of its siblings using a
javascript function.
This works fine on most browsers:
function putdivbefore(di vtomove, divtarget)
{
var mydiv1 = document.getEle mentById(divtar get);
var mydiv2 = document.getEle mentById(divtom ove);
mydiv1.parentNo de.insertBefore (mydiv2, mydiv1);
}
On IE, however, it gives spotty results. In a simple test page it
works fine, but when the page is more complex, it causes the browser
to stop loading the page and return "Operation was aborted."
Can anyone point me to a resource for this?
Thanks,
g.
javascript function.
This works fine on most browsers:
function putdivbefore(di vtomove, divtarget)
{
var mydiv1 = document.getEle mentById(divtar get);
var mydiv2 = document.getEle mentById(divtom ove);
mydiv1.parentNo de.insertBefore (mydiv2, mydiv1);
}
On IE, however, it gives spotty results. In a simple test page it
works fine, but when the page is more complex, it causes the browser
to stop loading the page and return "Operation was aborted."
Can anyone point me to a resource for this?
Thanks,
g.
Comment