0
页眉:防止JqueryMobile SimpleDialog缓存
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.css" />
<link rel="stylesheet" href="my.css" />
<link rel="stylesheet" type="text/css" href="http://dev.jtsage.com/cdn/simpledialog/latest/jquery.mobile.simpledialog.min.css" />
<style>
/* App custom styles */
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js">
</script>
<script src="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.js">
</script>
<script type="text/javascript" src="http://dev.jtsage.com/cdn/simpledialog/latest/jquery.mobile.simpledialog.min.js"></script><script>$.mobile.page.prototype.options.domCache = false;
$('.ui-page').live('pagehide',function(){ $(this).remove(); });</script>
当我使用:
$(document).delegate('#btnComment', 'click', function() {
$(this).simpledialog({
'mode':'blank',
'prompt':false,
'forceInput':true,
'cleanOnClose' : true, //!important..doesnt work
'useModal':true,
'fullHTML': '' })
});
曾经我把什么fullHTML,被缓存。
磨片n个用户修改页面,我重新打开对话框,内容没有更新,它仍然总是显示从以前的页面旧的内容。
我已经试过无数的建议,已经在互联网上公布。没有选择,或者我做错了什么。我真的appreachiate如何正确要么禁用缓存一些建议(我也使用PHP的头说没有缓存),或如何正确处置该对话框的!!!!!!!!!!!!重新初始化它肯定会渲染一个新的没有? cleanOnClose ..甚至取消点击不能解决问题,多数民众赞成使用接近相对
+'<table style="width:100%"><tr><td style="width:50%"><a id="btnSubmitComment" rel="save" data-role="button" href="javascript:submitCommentForm();" id="simpleclose">Save</a></td><td style="width:50%">'
+'<a rel="close" data-role="button" href="#" id="simpleclose">Cancel</a></td></tr></table>'
也这并不帮助
;$(this).simpledialog('refresh');
克里斯 - 这大概是一个月左右为时已晚,但我没有推这个新版本(称为,奇怪的是,SimpleDialog2) - 它修复了很多的巨大问题与“fullHTML” –