Posts Tagged ‘doctype’

HTML 5 Doctype and JavaScript having a tiff?

Friday, February 5th, 2010

So I was messing about with JavaScript today in an HTML 5 file. Everything was going along swimmingly and interactiveness of said web page was cranking along fine. Until…

Certain bits I was adding wouldn’t work. Specifically something like:

document.getElementById(“chooseAnImageName”).style.height = 400;

Once I remove the doctype declaration, “<!DOCTYPE html>”  from the file everything worked fine. Not sure why this is happening or what other bits of JavaScript will also conflict within an HTML 5 page. The Googles have produced nothing.

Guess I’m going to find out on my own.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes