Why is that some of the components (JS based) in my application work in IE7 but not in IE9? For example, one of my checkbox dint work in IE9, but as soon as I switched the document mode to IE7, it works fine.
Ideally what ever works in a previous version of the browser, should also work in a newer version. May be I don't understand how it is happening with IE. Could some one please help me understand this?
While it's true that there is an ideal that things continue to work the way they have, there is a natural tension between innovation and compatibility. The former provides new ways of doing things more easily. The latter hopes to maximize return on previous investment. The practical truth is that things change over time and applications must be maintained in order to be relevant and functional.
In recent versions, the IE team has invested a great deal of time and energy in making IE more interoperable with various web standards and other major browsers. This means more focus on common behaviors and less focus on proprietary features or older techniques.
Without more specific details about the components that are failing, e.g. the underlying code and error conditions, one can only speculate as to the reasons. It's possible that your components rely on features that are no longer supported in newer versions of IE. It's possible your components rely on behavior that's changed in more recent versions of IE. Hard to say.
You're going to need to dig into your components and find out why they are failing. The IE Compatibility Cookbook may be of help as it describes many of the compatibility changes in recent versions of IE. Also, the F12 developer tools may help identify problems in your components.
Without more specific information, though, it's hard to provide specific answers.
Hope this helps...
-- Lance