TommyCarlier said:
turrican said:
*snip*

Been there, done that. Tongue Out

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);
}

Yes, very true. Thank you very much to the tip. I actually usually do that. However, I'm in middle of a very big project which needs to be done "yesterday" if you know what I mean. hehhe... so I'm a bit stressed out on it and just want to get it to work and out the door. I'll then come back when I have time and rewrite the horrible coding mess I created. haha

Tongue Out