turrican said:Never mind, just solved it.
I did this : .createElement("SOMENAME") instead of .createElement("DIV")
*lol*... I'm an idiot. ( this took me 2 hours haha )
Been there, done that. ![]()
To stop making such mistakes, I found it's a good idea to write simple wrapper functions to create elements:
function createElementWithID(tag, id)
{
var e = document.createElement(tag);
e.id = id;
return e;
}
function createElementWithClassName(tag, className)
{
var e = document.createElement(tag);
e.className = className;
return e;
}
function createDivWithID(id)
{
return createElementWithID('DIV', id);
}
function createDivWithClassName(className)
{
return createElementWithClassName('DIV', className);
}