Jump to content

Head First JavaScript Chap 3 - onresize not an attribute of body

LindaHarmes's Photo
Posted Oct 21 2011 12:00 PM
4127 Views

In Head First Javascript, page 108, when I type in
<body onload="resizeRock();greetUser();" onresize=="resizeRock();">
I get an error saying that onresize is not an attribute of body when I try to run the page. How can I correct this?

Tags:
0 Subscribe


1 Reply

0
  LindaHarmes's Photo
Posted Oct 21 2011 01:33 PM

Update:
Once I took out the <!DOCTYPE html .....> line inserted by VS 2010 and removed the xmlns attribute, also added by VS 2010, everything worked fine.