Window close delay

4 posts, 0 answers
  1. asilioni
    asilioni avatar
    17 posts
    Member since:
    Feb 2011

    Posted 19 May 2012 Link to this post

    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
  2. Steven
    Steven avatar
    6 posts
    Member since:
    May 2012

    Posted 22 May 2012 Link to this post

    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
  3. asilioni
    asilioni avatar
    17 posts
    Member since:
    Feb 2011

    Posted 22 May 2012 Link to this post

    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

  4. rdmptn
    rdmptn avatar
    72 posts
    Member since:
    Aug 2011

    Posted 23 May 2012 Link to this post

    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.
Back to Top