This code works in IE (pops up the div) but not in firefox, I cannot see why, any ideas?
[CODE=javascript]function creatediv(id, html, width, height, left, top) {
if (document.getEl ementById(id) != null) {
removediv(id);
}
var newdiv = document.create Element('div');
newdiv.setAttri bute('id', id);
document.body.a ppendChild(newd iv);
if (width) {
document.getEle mentById(id).st yle.width = 300;
}
if (height) {
document.getEle mentById(id).st yle.height = 300;
}
if ((left || top) || (left && top)) {
document.getEle mentById(id).st yle.position = "absolute";
if (left) {
document.getEle mentById(id).st yle.left = left;
}
if (top) {
document.getEle mentById(id).st yle.top = top;
}
}
document.getEle mentById(id).st yle.background = "lightyello w";
document.getEle mentById(id).st yle.border = "4px solid #000";
if (html) {
document.getEle mentById(id).in nerHTML = html;
} else {
document.getEle mentById(id).in nerHTML = "nothing";
}
document.getEle mentById(id).st yle.filter='alp ha(opacity=75)' ; // IE Semi Transparent Setting
document.getEle mentById(id).st yle.opacity='0. 75'; // FireFox Semi transparent Setting
}
function removediv(id) {
var d = document.getEle mentById(id);
document.body.r emoveChild(d);
}[/CODE]
[CODE=javascript]function creatediv(id, html, width, height, left, top) {
if (document.getEl ementById(id) != null) {
removediv(id);
}
var newdiv = document.create Element('div');
newdiv.setAttri bute('id', id);
document.body.a ppendChild(newd iv);
if (width) {
document.getEle mentById(id).st yle.width = 300;
}
if (height) {
document.getEle mentById(id).st yle.height = 300;
}
if ((left || top) || (left && top)) {
document.getEle mentById(id).st yle.position = "absolute";
if (left) {
document.getEle mentById(id).st yle.left = left;
}
if (top) {
document.getEle mentById(id).st yle.top = top;
}
}
document.getEle mentById(id).st yle.background = "lightyello w";
document.getEle mentById(id).st yle.border = "4px solid #000";
if (html) {
document.getEle mentById(id).in nerHTML = html;
} else {
document.getEle mentById(id).in nerHTML = "nothing";
}
document.getEle mentById(id).st yle.filter='alp ha(opacity=75)' ; // IE Semi Transparent Setting
document.getEle mentById(id).st yle.opacity='0. 75'; // FireFox Semi transparent Setting
}
function removediv(id) {
var d = document.getEle mentById(id);
document.body.r emoveChild(d);
}[/CODE]
Comment