M
Michael Phillips
Hello
I am trying to use DOM to create an object in a document and wish to be
compativle with Opera
My code is
containerDiv = document.createElement("div"); //create download
container div
containerDiv.setAttribute("id", "statusContainer");
containerDiv.style.position = "absolute";
//containerDiv.style.left = x + "px";
//containerDiv.style.top = y + "px";
containerDiv.style.left = 100 + "px";
containerDiv.style.top = 100 + "px";
containerDiv.style.width = "293px";
containerDiv.style.height = "80px";
//containerDiv.style.visibility = "hidden";
containerDiv.style.borderStyle = "groove";
containerDiv.style.borderColor = "#b7b7b7";
containerDiv.style.borderWidth = "2px";
(put stuff in div).... and finally......
document.body.appendChild(containerDiv);
This works in IE 6+ and gecko, but does not work in Opera ( I currently
have verson 7.11)
I've tried to filter on if (document.createElement) but Opera passes the
test.
I've read the Opera support documentation it it seems that this should
work. Can anyone let me know if I am barking up the wrong tree?
Many Thanks
Michael
I am trying to use DOM to create an object in a document and wish to be
compativle with Opera
My code is
containerDiv = document.createElement("div"); //create download
container div
containerDiv.setAttribute("id", "statusContainer");
containerDiv.style.position = "absolute";
//containerDiv.style.left = x + "px";
//containerDiv.style.top = y + "px";
containerDiv.style.left = 100 + "px";
containerDiv.style.top = 100 + "px";
containerDiv.style.width = "293px";
containerDiv.style.height = "80px";
//containerDiv.style.visibility = "hidden";
containerDiv.style.borderStyle = "groove";
containerDiv.style.borderColor = "#b7b7b7";
containerDiv.style.borderWidth = "2px";
(put stuff in div).... and finally......
document.body.appendChild(containerDiv);
This works in IE 6+ and gecko, but does not work in Opera ( I currently
have verson 7.11)
I've tried to filter on if (document.createElement) but Opera passes the
test.
I've read the Opera support documentation it it seems that this should
work. Can anyone let me know if I am barking up the wrong tree?
Many Thanks
Michael