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!
Leave a Reply