Click here to Skip to main content
15,881,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello all

I am creating modelpop-up in Iframe (my project needs it)

But i watched one surprised scenario

when ever my I frame opens, the CPU Usages touches almost over 90%!! ,and when i closed it the Iframe again its(cpu usage) come arround 5-6 %.

Has any body has Idea why this is happening
Posted
Comments
Karthik Harve 19-Feb-13 4:24am    
are you trying to show details of some other screen, in modal popup using iframe ?
nil1385 19-Feb-13 4:26am    
yes in the iframe I Open(load) another aspx page details

1 solution

Hi,

Instead of "IFrame" in modal popup, i suggest to go for showModalDialog" feature.
showModalDialog[^]

so, on client click of any button/ link (as you were using target control for modal popup), add below code.
JavaScript
function openWindow()
{
    return window.showModalDialog(url);
}

So, this will open the screen specified in url as modal dialog. the previous screen controls are not accessible.

you can keep one button in that new screen, and on client click of the add below code.
JavaScript
function CloseWindow()
{
    return window.close();
}

this will close the modal dialog.

like this you can avoid the use of IFrame and this is once of the options using which you can avoid it and also you can achieve modality.

hope it helps.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900