I've been fighting IE8 compatibility mode all day, and I'm going to lure a brick into it.
I have code that uses jquery 1.2 (yes, it's old - can't change this) to search for some entries in our web application. You can click the search results to view the contents of the record (using .animate (), it opens a space under the line and creates another TR at the bottom and inserts the HTML data from the json channel).
In IE8, clicking on the result to view the content causes it to reboot in compatibility mode, where it works fine in all other browsers (IE7, FF3.0 +, Chrome, Safari). I tried to use the IE8 Developer Toolbar to debug and track why this was happening, but I could not find any error or any evidence that might cause it.
Code that shows the preview:
var _tr = $('<tr class="outline" id=' + val.assessment.assessmentId + '></tr>').bind("click", msi.reuseAssessment.preview);
...
var url = "/direct/msi-assessment/" + assessmentId + "/assessmentHtml.json?no-cache=true";
jQuery.ajax({
type: "GET",
url: url,
dataType: "json",
success: function(d, textStatus){
var _content = d.assessmentHtml;
var _preview = $("<tr id=" + assessmentId + "></tr>");
_tr.after(_preview.animate({
height: 50
}, 500, 0, function() {
msi.reuseAssessment.drawPreview(this, _content);
}));
},
error: function(xmlHttpReq, status, errorThrown) {
}
});
By executing the code using the IE8 developer tools, it is passed here and somewhere to jQuery code, and when it is updated in compatibility mode. I checked JSON, the HTML that comes with w3c, and all this is great, I'm really at a loss as to what is going on.
Does anyone know how I can better track what causes it, or am I just forcing IE7 mode on these pages?
: ajax, . ( HTML) HTML div . , HTML ( <html></html> ..). ?
3: .
2: . , IE8 ? .