inconsistency in using jquery ajax for IE8 alone
i am loading a html content which has an image, text in some table format into a div . it works without any problem in firefox and chrome. but in IE8 it works only for limited number of times. then nothing comes over there. strangely other javascript actions also dont work . please help . i am fighting with it without much knowledge for 2 days
Code:
if($.browser.msie){
$.ajax({
type: "POST",
xhr: (window.ActiveXObject) ?
function() {
try {
return new window.ActiveXObject("Microsoft.XMLHTTP");
} catch(e) {}
} :
function() {
return new window.XMLHttpRequest();
},
url: './ajax_funcs.php?func=to_box',
开发者_开发技巧 data: {id_to:id,enc_id:enc_id},
success: function(data){
$('.current_action_to').hide();
$(current_action_to_id).center_to();
$(current_action_to_id).html(data);
$(current_action_to_id).show();
}
});
}
else{
$.post('./ajax_funcs.php?func=to_box',{id_to:id,enc_id:enc_id},function(data){
$('.current_action_to').hide();
$(current_action_to_id).center_to();
$(current_action_to_id).html(data);
});
$(current_action_to_id).ajaxComplete(function(){
$(current_action_to_id).show();
});
}
but instead of xmlhttp thing if i give $.post it happens only once but others are working properly. at the same time if i give some alert statement somewhere overthere then it comes everytime
精彩评论