For most cases, I'd shun using document.write or innerHtml, unless you are targeting legacy browsers.
To keep yourself moving forward for compliance, I'd recommend using DOM.
document.write started with Netscape2 and IE3.
innerHTML support started with IE4 and Netscape6.
However, neither is part of a standard, like DOM.
I have a lot of respect for both Adam and Danny but, weren't you guys just complaining about IE's lack of standards support.
Go with Jito's advice. Its a little more work and has a higher learning curve but, you find less suffering down the road.
Basically, you will do
var myNewDiv = document.createElement("div");
// add some properties and/or children
node.appendChild(myNewDiv);
|