This problem only occurs in IE. The strange thing is that for pages with this problem, refresh them again and Ajax works normally. By the way, my jQuery version is 1.4.2. Solution (from here ):
4954 rows found in the jQuery-1.4.2.js,
Return new window. XMLHttpRequest ();
Change
The Code is as follows:
If (! $. Browser. msie ){
Return new window. XMLHttpRequest ();
} Else {
Return new window. ActiveXObject ("Microsoft. XMLHTTP ");
}
Over.
This is probably because IE7/8 has some problems with XMLHttpRequest support. If the server fails to correctly send the charset HTTP Header, however, after the page is loaded, the charset can be determined by parsing the HTML Header. Therefore, the second loading of the page is normal.
So let them use ActiveXObject.
Http://www.yiiframework.com/forum/index.php? /Topic/9739-auto-complete-ajax-problems-in-ie-with-jquery-142/