lil snippet from one of my functions in a project I'm workin on. now see, the first part here works, but the second part won't append msgArea to area, but it will append it to body. I have no idea what the problem is, and firefox's error console doesn't tell me a thing. I know I can append to another div, cause I did it at other times in the code.
odds are it's something really stupid that I'm missing here...
Code:
var body = document.getElementsByTagName("body");
var area = document.createElement("div");
body = body[0];
body.appendChild(area);
this.cardAreas[this.cardAreas.length] = area;
area.setAttribute("id", name);
area.style.position = "absolute";
area.style.width = "310px";
area.style.height = "200px";
area.style.border = "1px solid #000000";
area.style.textAlign = "center";
area.style.font = "10pt normal sans-serif";
area.active = true;
area.bet = 0;
//create an area for messages
area.msgArea = document.createElement("div");
area.appendChild(area.msgArea);
area.msgArea.style.zIndex = "125";
area.msgArea.style.position = "absolute";
area.msgArea.style.top = "50px";
area.msgArea.style.left = "0px";
area.msgArea.style.width = "310px";
area.msgArea.style.font = "30pt thick sans-serif";
area.msgArea.style.textAlign = "center";
area.msgArea.innerHTML = "pie";
odds are it's something really stupid that I'm missing here...