k this is probably something very easy but for some reason i am getting an error when trying to use javascript to change style.height.
My javascript looks like this:
document.getElementById('div').style.height=100px;
I have also tried
document.getElementById('div').style.height='100px';
document.getElementById('div').style.height='100';
document.getElementById('div').style.height=100;
and get the same error every time.
The error i am getting is:
document.getElementById('div') is null
I get this error in my firebug console. Thanks.
You probably don’t have an element with
id="div".Or you’re running your code before the body exists.