NetManiac

Witold Rugowski on web20 wave with Ruby on Rails

Why I do hate IE – or just MS Script Debugger?

Posted on June 12, 2007 - Filed Under JavaScript

I have discovered some time ago that IE does treats Arrays and Hashes (JavaScript) a bit differently than Firefox when there is coma after last element. This is quite obvious ;-) and maybe IE is more standard compliant, but this is not the point.

Let’s take following JS code:

function loadSuggestions() {
   new Ajax.Updater ( 'suggestions', '/suggestion/',
      { method: 'get', })
}

As I said this case when there is not needed comma in option hash passed to Ajax.Updater. IE fails to compile this code and that’s OK. Problem is how it is shown.

loadSuggestions was placed in external .js file included with script tag and loadSuggestions was called in onload property of HTML body. IE7.0 with MS Script debugger stops on onload property with Identifier expected or something similar. Any tip that external .js file failed to compile.

Again – Firefox with Firebug sets developers expectations very high!

Popularity: 3% [?]

Hits for this post: 2461

Similar Posts

Comments

Leave a Reply