This is a migrated thread and some comments may be shown as answers.

Window close delay

3 Answers 167 Views
Window
This is a migrated thread and some comments may be shown as answers.
asilioni
Top achievements
Rank 1
asilioni asked on 19 May 2012, 08:19 AM
Hi,
I am using a radwindow, and load an .aspx page in it. The only allowed behaviour of the window is the closing. The page that is loaded in the window has a listview control, and two grids. When i press the close button on the window titlebar, the window does not close immediately, which is the desired behaviour, but it takes a few seconds. How can I decrease that delay?

Thanks a lot,
Angie

3 Answers, 1 is accepted

Sort by
0
Steven
Top achievements
Rank 1
answered on 22 May 2012, 12:36 PM
Hello friends,

We can easily combine these two pieces of code to make the window close itself automatically after a certain time has elapsed. The code that we would use to do this as follows if placed in the code in the main window: setTimeout ('TheNewWin.close ();',30000); or like this if added to the pop-up/pop-under window itself: setTimeout ('self.close ();',30000); In both examples I have used 30 seconds (30000 milliseconds) as the delay before closing. You can easily change this to whatever amount of time (in thousandths of a second) that you require.

Best regards
Steven Dilley
0
asilioni
Top achievements
Rank 1
answered on 22 May 2012, 12:52 PM
Hi Steven,
thank you for your reply, but your answer is not exactly what i am looking for. My ploblem is not that i cannot close the radwindow after a certain period of time but the fact that after I press the close button of the window it closes after a few seconds...I tried the following code on the OnClientClose event of the radwindow with no big difference.

function UnloadPage(sender, args) 

{

  sender.setUrl("about:blank");




Thanks,
 Angie

0
rdmptn
Top achievements
Rank 1
answered on 23 May 2012, 08:38 AM
Have you tried it in OnClientBeforeClose? If your page is very heavy then the browser simply needs time to hide all the elements on the page, so ultimately you can revert to a regular browser window to avoid the iframe. In this regard - you can give the DestroyOnClose property a go - see if turning it off/on helps in your case.
Tags
Window
Asked by
asilioni
Top achievements
Rank 1
Answers by
Steven
Top achievements
Rank 1
asilioni
Top achievements
Rank 1
rdmptn
Top achievements
Rank 1
Share this question
or