Closed zaherg closed 12 years ago
I can confirm this as well - even on pages that are passed url parameters, the first url clicked content will display in subsequent modals, and will persist until page refresh.
its an old problem #4197 but i dont know why they didnt fix it .
A workaround: $('body').on('hidden', '.modal', function () { $(this).removeData('modal'); });
@bes89 Thanks for this. Used it in the admin of our bootstrap based CMS. See: https://github.com/e107inc/e107
Hi everybody, i know this is an old Issue but:
$('body').on('hidden', '.modal', function () { $(this).removeData('modal'); });
only work's in Chrome and Firefox. If i use IE 8,9,10 the content of the modal doesn't reload.
For better unterstanding:
this is my modal
$('#myModalChange').modal({
remote: '/Operation/Change/?dn=' + encodeURIComponent(obj[0].attributes.dn.nodeValue),
keyboard: false,
backdrop: "static"
})
i used it in jstree. I have debugged the Controler /Operation/Change/ and the controler only called in Chrome or Firefox. In IE he shows directly the modal with the old content.
Any ideas??
Thanks
That is exactly right. It does NOT work on IE. However, the problem occurs when using the SAME URL. If the URL is different, it works. I worked around the problem using a dummy GUID in the URL.
<a href="LineEdit_Modal.aspx?ID=<%=data.ID%>&g=<%=Guid.NewGuid.ToString%>" data-toggle="modal" data-target="#ModalBox">edit</a>
After closing and opening same modal it will not request content. Adding $.ajaxSetup({ cache: false });
not helped. Is it but or there is some trick to avoid it?
since jsfiddle/jsbin does not support 2.1 yet ..