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

[Solved] OnClientClose?

1 Answer 224 Views
Window
This is a migrated thread and some comments may be shown as answers.
SamVanity
Top achievements
Rank 2
SamVanity asked on 25 Oct 2007, 08:53 AM
This issue has to do with this prometheus version. I never had this problem with the ASP.NET version of RadWindow.

Here is my script on the "windowed" page (not parent)
    <script type="text/javascript"
        var oWindow; 
        var actionTakenPlace = false
         
        try
            oWindow = GetRadWindow(); 
             
            oWindow.OnClientClose = function() 
            { 
                if (actionTakenPlace) oWindow.BrowserWindow.location.reload(); 
            } 
        } catch(err){ 
            alert(err.description); 
        } 
         
        function OpenAnotherWindow(url){ 
            var oBrowserWnd = oWindow.BrowserWindow; 
            oBrowserWnd.showWindow(url,'AnotherWindow', 800, 600); 
        } 
         
    </script> 

As you can see in the above code, I use try..catch but couldn't catch any error. oWindow indeed got the reference to the window itself, as the other function OpenAnotherWindow works fine.

The value for the actionTakenPlace variable is set through a radajaxpanel, and I have verified it works as I can send other javascript through responsescripts without any issues at all.

I have concluded that everything works -> only the OnClientClose fails. I tried the add_Close method, and it didn't work either.


1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 01 Nov 2007, 10:35 AM
Hi Sam Van,

We are not sure what the problem is and we are unable to reproduce it locally. Please open a new support ticket and send us a small sample project (please make sure it can be run locally) where we can observed the reported behavior. We will check the project and get back to you right away.




Regards,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Window
Asked by
SamVanity
Top achievements
Rank 2
Answers by
Georgi Tunev
Telerik team
Share this question
or