Welcome to WebmasterWorld Guest from 54.147.63.124

Forum Moderators: open

Message Too Old, No Replies

Inset iframe before div

insertBefore Menu

     
2:01 am on May 12, 2008 (gmt 0)

New User

5+ Year Member

joined:May 12, 2008
posts:1
votes: 0


How come the the following code is not working? Please help...

function InitMainMenu() {
var obj = document.getElementById("menuBar");
var iframeMain = document.createElement("IFRAME");
iframeMain.frameBorder = 0;
iframeMain.style.width = document.body.clientWidth;
iframeMain.src = "javascript:false;";
iframeMain.style.zIndex = 5;
iframeMain.style.position = "absolute";
obj.parentNode.insertBefore(iframeMain, obj);
}