G
Graham Charles
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(divtomove, divtarget)
{
var mydiv1 = document.getElementById(divtarget);
var mydiv2 = document.getElementById(divtomove);
mydiv1.parentNode.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(divtomove, divtarget)
{
var mydiv1 = document.getElementById(divtarget);
var mydiv2 = document.getElementById(divtomove);
mydiv1.parentNode.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.