debugging javascript for IE6

Subliminal Hash picture Subliminal Hash · Jan 21, 2009 · Viewed 10k times · Source

firebug is quite useful tool that I can't think myself living without it. I also downloaded the js file that helps you get similar functionality when using IE6 hoping it would help me resolve some issues, however, the messages I receive are not quite friendly such as:

"Expected ':' (default2.aspx,16)" - on line 16 there is nothing that can possibly expect a ":"

or

"Object doesn't support this property or method (default2.aspx,198)" on line 198 nothing interesting that can require any support for anything.

my site looks like a different web site in IE6.. most of the css doesnt work, some of the jquery functions doesnt work and I need to get this site work in IE6. Any help would be appreciated in terms of;

  • how to know what the messages (like the ones above) mean in IE6 and how to effectively debug js in IE6?

  • where to start for css compatibility.. e.g. shall I create different css files for different browsers and load them by detecting the browser? or are there any common issues and hacks?

I am lost so please give me any direction to start..

Answer

AnthonyWJones picture AnthonyWJones · Jan 21, 2009

You debug javascript in IE6 with:-

Microsoft Script Debugger

The QuirksMode website is useful site to determine which bits of CSS is implemented in what way by which browser. Note IE6 "standards" mode rendering is notoriously buggy.