Go Back   Velocity Reviews > General Computer Discussion > Software
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread
Old 03-28-2008, 04:11 PM   #1
Default Dynamic Iframes Memory Leak In Internet Explorer


I have an Infragistics UltrawebGrid [hierarchical grid with 3 levels]. Each Row in the grid is attached to a context menu using Infragistics CSOM [Client Side Object Model]



Upon click on the menu, I am creating an Iframe dynamically which loads another page in the same domain [same web application] which also contains infragistics datagid [non hierarchical] populated with default data retrieved from Data Base. After creating the frame I am attaching it to the HTML DOM [Div Layer] and show it as modal popup with OK and Cancel Button. Upon click on any of the buttons, I am destroying the Iframe from DOM.

Following are the functions I am using for Iframe Creation and Destroy.
Code:
//------------------------------------------------------------------------- // oSrcCtrl – Parent Control where dynamic iframe to be attached (DIV) // strFraId - Iframe Identifier //------------------------------------------------------------------------- function CreateIFrame(oSrcCtrl,strFraId) { var iframe = document.createElement("iframe"); iframe.setAttribute("id", strFraId); iframe.setAttribute("scrolling", "no"); iframe.setAttribute("frameBorder", "0"); oSrcCtrl.appendChild(iframe); } //------------------------------------------------------------------------- // oSrcCtrl – Parent Control where dynamic iframe to be attached (DIV) // strFraId - Iframe Identifier //------------------------------------------------------------------------- function DestroyIframeById(oSrcCtrl, strFraId) { if (document.all) { document.getElementById(strFraId).src = 'javascript:false'; document.all[strFraId].outerHTML = ''; }else{ oSrcCtrl.removeChild(document.getElementById(strFraId)); } }
Repeatedly clicking on the menu [for iframe creation] & OK, Cancel button [for destroying iframe] causing huge performance bottleneck. The amount of memory used by the IE keeps on increasing for each clicks I.e. [Dynamic Creation of iframe and Removing the same after button click] but while unloading the page i.e. navigating to a different page the IE memory usage comes to normal.



I would need your help to validate my JavaScript codes for Iframe creation and Remove. Also request you guys to suggest some alternate solutions to get away this memory leak.



Note:

1. The response time to load the iframe is not an issue; it loads with in the expected time

2. For each Iframe request the response size is nearly 500KB [includes data retrieved from database + infragistics JavaScript resource files]


cdmsenthil@gmail.com
cdmsenthil@gmail.com is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Internet Explorer 8 RC1 Admin Front Page News 0 01-29-2009 02:19 PM
How do I fix (Internet Explorer cannot display the webpage)? coffeyman MCTS 4 01-26-2009 04:07 PM
Re: Microsoft Internet Explorer rock A+ Certification 2 11-03-2005 08:06 PM
Re: Microsoft Internet Explorer Jason Peavey A+ Certification 0 11-03-2005 08:03 PM
Re: Microsoft Internet Explorer Atxa A+ Certification 0 11-01-2005 05:09 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46