I'm using dialog widget at my asp.net appllication.
in my code i show iframe with another asp page inside dialog
iframe and its wrapper are dynamic elements (which created before dialog showes and removed after its closed)
here is my code:
- // Dialog Link
- $('#dialog_link').click(function () {
- $('<div id="dialog" ><iframe src="Default.aspx"></iframe></div>').dialog(
- {
- width: 200,
- height: 200,
- modal: true,
- open: function () {
- // $(this).find('iframe').attr('src', 'Default.aspx');
- }
- , close: function () {
- $(this).remove();
- }
- }//end of inner parameter
- )//end of dialog()
after displaying dialog once, and closse and reopen it again- the inputs on the page inside iframe became inaccessible
(it happens only in IE, versions 8,7)
Workaround i have found:
to refresh iframe before rremove it
- , close: function () {
- //workaround
- $(this).find('iframe')[0].src = $(this).find('iframe')[0].src;
- $(this).remove();
- }
Hope it will help somebody