Ok – so you need to support IE7. Here’s a short list of things you may need

needsIEFix:function() {
var ua = navigator.userAgent;
return /msie [5-7]\./i.test(ua);
}

Expected identifier, string or number
  • Things that were center aligned in IE8 and chrome, firefox etc were broken in IE7. Used this to fix this prob (http://iemarginfix.sourceforge.net/tests/marginfix.html)
  • z-index problem. Google this and you will see many solutions. My main prob was my dropdown menus were being hidden below other divs. I applied the following javascript soln.

if( common.needsIEFix() ) {
var zIndexNumber = 1000;
$(‘div’).each(function() {
$(this).css(‘zIndex’, zIndexNumber);
zIndexNumber -= 1;
});
}

  • The above soln to z-index was causing some elements to disappear in IE7. The orig soln was zIndexNumber -= 10; which I replaced with zIndexNumber -= 1; as the zIndex was becoming negative and hence some elements were disappearing.
  • Then came the prob of JQuery dialogs which would not allow keyboard inputs i.e forms in modal dialogs were not fillable – no keyboard events were reaching it. The soln was to make the modal dialogs non modal as in IE7 modal dialogs do not allow keyboard inputs to be received by the dialog.
  • Jquery .html() function to replace html of a given div was not working e.x $(“#xyz”).html(custom_html) was not working. the problem was that #xyz was not unique id in the current DOM. Ensure unique id is used when using .html() function.