This is my 1st post here and I'm entirely new to jquery. With that being said, I'm having issues with jquery .load function in IE when FF & Safari are working perfect. Right now, I'm creating an Inbox utility, so when user delete an email message, the messages will be move to trash folder, and deleted messages from trash folder may be move back into Inbox. My dilemma with IE is that when I remove a message, the content of the div on the same page disappear when it should be reloading the number of messages to be display to a certain div section call .reloadmsg. I tried testing it to load my entire index front page or other page, and it loads the entire page content ok. But in this case, it doesn't. What seems to be the issue?
function deleteMsgs(list, page, total){
var data = "";
var i = 0;
var totChkbox = 0;
$(':checkbox').each(function(){
if($(this).attr('checked') == true){
data += $(this).val() + ',';
i++;
}
totChkbox++;
});
if(i > 0){
var msg = (i > 1) ? i+' messages' : i+' message';
var txt = 'Do you want to delete '+msg+' from inbox?';
$.prompt(txt, {buttons:{Yes:true, No:false}, focus: 1, top: '40%', opacity: 0.25,
//v = value of button click
//m = msg in the active state when user clicked
//f = key/value pair of form value
callback: function(v,m,f){
if(v){
$(':checkbox').each(function(){
if($(this).attr('checked') == true){
var id = $(this).val();
$('ul.msg'+id).fadeOut('slow', function(){$(this).remove();});
}
});
$.ajax({
type: 'post',
url: '/trashmsgs/',
data: 'messages='+data,
cache: false,
success: function(result){
if(result == 1){
var path = window.location.pathname;
if(page > 1){
var to = (list * page);
/* return to previous page when deleted messages are more than total messages */
if(i == totChkbox && to >= total){
page--;
path = '/inbox/page/'+page;
window.location = path;
}
}
/* reload div on the page without refreshing entire page content */
$('.reloadmsg').load(path+' .reloadmsg', function(data){
//alert("reloading...Data: " + data);
});
}
}
});
return false;
}
else{}
}
}); //end prompt
}
}