Some of my scripts work fine in FireFox, but give errors in ie7 & 8.
Where can I find resources on how to avoid/fix these errors?
For example, I get this error in ie7 & 8 but no error in FireFox 3:
Expected ')'
Some of my scripts work fine in FireFox, but give errors in ie7 & 8.
Where can I find resources on how to avoid/fix these errors?
For example, I get this error in ie7 & 8 but no error in FireFox 3:
Expected ')'
I don't think such a list exists. By and large, the implementations of core JavaScript functions should be fairly identical. It's the Document Object Model that has many differences.
Make sure you use Firefox's JavaScript error console and IE8's new developer tools (and if necessary, the script debugger for older IE versions, but avoid it if you can - it's a pain to get running). You should be able to sort out all errors with these tools relatively quickly.
Also, it's a good idea to use a framework like JQuery or Prototype - they were designed to work around the various cross-browser differences.
As for the error you mention:
Expected ')'
This is usually dwen to an extra comma at the end of a list:
test = { key1: value1, key2: value2, key3: value3, }
Firefox accepts that, IE doesn't - quite correctly in this case.
http://www.quirksmode.org/ has some browser compatibility tables, but its javascript information is mostly around DOM manipulation.
I might also insert a plug for jquery http://jquery.com/ which takes care of a lot of the javascript issues for you when using their library.