Yeah, always a fun one. Years of HTML4 have tricked people into thinking onClick and onMouseOver are valid in XML, which of course they aren't.
This applies to all XML, including XHTML. All attributes of elements must be lowercase, must be in name=value pairs, and the value must be enclosed in quotes.
The best piece of advice I can give when coding javascript is to wrap all code in possibly multiple layers of try/catch blocks, and to run the code within a debugging environment. Catch those errors!
1 Comments:
Yeah, always a fun one. Years of HTML4 have tricked people into thinking onClick and onMouseOver are valid in XML, which of course they aren't.
This applies to all XML, including XHTML. All attributes of elements must be lowercase, must be in name=value pairs, and the value must be enclosed in quotes.
The best piece of advice I can give when coding javascript is to wrap all code in possibly multiple layers of try/catch blocks, and to run the code within a debugging environment. Catch those errors!
6:02 pm
Post a Comment
<< Home