Jump to content

Head First JavaScript - document.body.clientHeight not in intellisense

LindaHarmes's Photo
Posted Oct 21 2011 11:41 AM
17345 Views

When I created the function resizeRock() and typed in the line
document.getElementById("rockImg").style.height = (document.body.clientHeight - 100) * 0.9;
the attribute clientHeight does not show up in intellisense and the height that is returned is 81, so the picture doesn't resize. If I change the 100 to 10, it will resize but I'm wondering if I need a Javascript update or if there is another problem. I am using Internet Explorer version 8.0.6001. Thanks.

1 Reply

+ 3
  LindaHarmes's Photo
Posted Oct 21 2011 01:35 PM

Update:
Once I took out the <!DOCTYPE html .....> line inserted by VS 2010 and removed the xmlns attribute, also added by VS 2010, I no longer got an error running the page and the resize function worked correctly.