日期:2014-05-16  浏览次数:20566 次

修改资料后无法及时刷新成修改后的资料
本帖最后由 showbo 于 2012-12-24 10:55:06 编辑
ajax修改资料后刷新无法及时查看到修改后的资料,只有退出平台重新登录才行
  function editCustomerDialog(url,type){
   var titleText="修改客户资料";
   if(type==1){
     titleText="查看客户资料";
   }
  
    
    $.ajax({
global: false,
url:url+"&random="+Math.random(),
type: 'post',
dataType: 'html',
timeout: 10000,
success: function(res){
 $("#messageTex").html(res);
 
 $("#messageTex").load(url);
 $("#messageTex").dialog({
autoOpen:false,
title:""+titleText,
modal:true,
width:850,
cache:false,
resizable:false,
close:function(event, ui) { $(this).dialog("destroy");}
});
    $("#messageTex").dialog("open");
 }
}); 
}

cache:----已经设置成false后还是不行,只有退出平台后,重新登录才能显示修改后的资料

------解决方案--------------------
             $("#messageTex").html(res);
              
             $("#messageTex").load(url);

这2句是不是重复了?既然用ajax加载内容了,干嘛还load一次?