ヘッダー:
<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 に入れたものはすべてキャッシュされます。
ユーザーがページを変更し、ダイアログを再度開くと、コンテンツは更新されず、常に前のページの古いコンテンツが表示されます。
私は、インターネット上ですでに利用可能な無数の提案を試しました. 選択肢が残っていないか、何か間違ったことをしています。キャッシュを適切に無効にする方法(キャッシュなしと言うためにphpヘッダーも使用します)またはこのダイアログを適切に破棄する方法について、いくつかのアドバイスを本当に感謝します!!!!!!!!!!!! それを再初期化すると、確かに新しいものをレンダリングするはずです?? cleanOnClose ..キャンセルをクリックしても問題は解決せず、close relを使用しています
+'<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');