IE reserved keywords
Once again i fell into the hands of the evil one.
I was implementing this extension to YUI’s extenion
that generates nice looking charts. I had everything working on Firefox when I saw that the chart, along with other things, did not generate on IE. I said to myself that it must be my fault, not the YUI or the extensions’ fault. So I went debugging, which you all know is not trivial in IE.
I spent an hour or so just to find out that Yahoo’s connector was not building the query string at all in IE when reading a form with Connector.setForm().
So I took a look inside my template to see what was going on and after a dozen checks It turned out to be the INSANE fact that I was using the word ‘length’ as an id.
I mean, who do I think I am to use ‘length’ as id. I must be crazy.
After a very small search about reserved keywords I found this blog entry.
I do not know how many of you have fallen into this trap but it is common to ignore some ( rare ) things up until the moment the nature of programming makes us face them. And once again, I found something about IE that I didn’t know and once again I wanted to kill it.
But the least I/we can do is raise more anti-IE awareness for the sake of web developers firstly
and general web security secondly!! Am I ignorant?
Posted in Internet Explorer, Firefox, IE, HTML, Web Development, Javascript |
August 17th, 2007 at 11:58 am
It seems to be true NOT only for ids, but even for some sort of reserved keywords each browser has (i.e. IE6) that lead the browser to parsing error. The last I’ve trapped in is the “class” keyword I’ve used as parameter in a function definition: simply IE6 did not parsed source correctly, and raised an “Identifier expected”!