Hello
As I have noticed, creating a new window programmatically, appends the Panel to Body each time the window is created.
Besides, comboboxes and other functionalities are also appended to the the Body, thus storing a huge amount of code in browser console.
I am wondering whether it can affect the speed of the ajax-based website if the user doesn't refresh the page but loads new content dynamically over and over again?
For example this code:
var win = $('<div id="CreateUserWindow"></div>').appendTo('body');
win.window({
title: 'საოპერატორო: მომხმარებლის შექმნა',
width: '80%',
height: 600,
modal: true,
resizable: true,
closeAnimation: 'hide',
minimize: 'animate',
collapsible: false,
href: false,
bodyCls: 'f-column',
onMinimize: function() {
if (tabPanel.tabs('exists', WindowMinimizeTitle)) {
tabPanel.tabs('select', WindowMinimizeTitle);
return false;
}
tabPanel.tabs('add', {
id: WindowMinimizeId,
title: WindowMinimizeTitle,
content: '<div id="tabs-window-' + WindowMinimizeId + '" style="position:relative;width:100%;height:100%;overflow:auto"></div>',
fit: true,
closable: true
});
$('#WindowFooter').contents().appendTo(f);
f.appendTo('#tabs-window-' + WindowMinimizeId + '');
}
});
Each time I create the window using this method, old windows still remain in the console and new windows are added.
Is it ok?
How can I remove the appended code from Body once I close the Window, for example? Is it ok to leave it appended to the Body?
Thank you in advance