Hi
I think Im dealing with an IE insertBefore bug, the script runs fine in Chrome,
I have created my own modal box which gets inserted as a new node - the first inside the ... however, in IE, the new box is inserted within the first inside my body, which is my wrapper (centers content)... can anyone advise on where Im goign wrong, or how to correct it?
function showEmail(){
//create new node to insert
var blackOut = document.createElement('div');
blackOut.className = 'blackout';
//find the body tag
var bodybox = document.getElementsByTagName('body')[0];
//find all divs within the body
var allDivs = bodybox.getElementsByTagName('div');
var oldFirst = allDivs.item(0);
//fill the new node with a temporary loading animation
blackOut.innerHTML = '<div class="load"><img src="img/load.gif" /></div>';
//insert new node just inside the <body> - first element
bodybox.insertBefore(blackOut,oldFirst);
/*... then make an ajax call and fill new node with contact form information... */
}