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

ClientClose adding in window, define in parent

1 Answer 49 Views
Window
This is a migrated thread and some comments may be shown as answers.
Jan
Top achievements
Rank 1
Jan asked on 28 Apr 2010, 10:04 AM
Hi,

I would like to ask which way I can do this approach:

I set the radWindowInstance.add_close(closeFunction) (javascript) IN radWindow, but my definition of closeFunction is on the parent page. 

In Chrome i get closeFunction is not defined and didnt tested on other browsers. Javascript search for this function on page which is loaded onto radWindow. But I have it defined in parent. 

for getting insatnce of RadWindow i use GetRadWindow() funcation.

Is this approach even possible? Set up close function in window and define it in parent?

I have no idea how deal this with other way. I Have radWindow deeply implemented and need this functionality for passing parameters. 

Thanks for every reply. 

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 28 Apr 2010, 12:39 PM
Hi Jan,

You can try calling a function defined in parent page, from the radwindow page as described in the following documentation.
Calling Functions in Windows

Then in the called function, attach the OnClientClose event for the radwindow.
Here is the example code in radwindow page:
javascript:
 
    function attachClose() { 
        GetRadWindow().BrowserWindow.CalledFn(); // call the Fn in parent 
    } 
.
Now in the parent page, write the code for attaching the event:
javascript:
 
<script type="text/javascript"
    function closeFunction() { 
        alert("closeFunction....."); 
    } 
 
    function CalledFn() { 
        var oManager = GetRadWindowManager(); 
        oManager.getWindowByName("Window1").add_close(closeFunction);   
    } 
</script> 

Regards,
Princy.
Tags
Window
Asked by
Jan
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or