the coding room

a place for coder talks

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 | 1 Comment »