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

Problem in Adding a function to close window

3 Answers 105 Views
Window
This is a migrated thread and some comments may be shown as answers.
Brijendra Kumar
Top achievements
Rank 1
Brijendra Kumar asked on 11 Feb 2009, 07:31 AM
Dear Sir,

I have three pages in one page i have taken rad splitter. In one splitter pane i am calling to second page.
In Second page i have again taken a splitter and calling third page.
on third page when i open a radwindow and add a close handler. then it was giving an error
"Stack overflow at line:0"

Does anybody know then please tell me how to resolve this.

Thanks
Brijendra

3 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 11 Feb 2009, 01:00 PM
Hi Brijendra,

Please check the following forum thread:
http://www.telerik.com/community/forums/aspnet-ajax/window/will-using-radwindowmanager-open-function-instead-of-radopen-cause-any-issues.aspx#738662



Sincerely yours,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Brijendra Kumar
Top achievements
Rank 1
answered on 12 Feb 2009, 05:47 AM
Dear Georgi,

I have written the code to open a rad window is as follows:

This code is on Page1.aspx

oMailWnd = window.radopen(strUrl,strWndName);

oMailWnd.setSize(nSizeX, nSizeY);

oMailWnd.moveTo(0,0);

oMailWnd.set_modal(

true);

 

oMailWnd.add_close(onAllocateWindowClose)

function onAllocateWindowClose()
{
    alert("Brijendra");
}

if any other way, by using that  i will not get stack overflow and value will be passed from child window to opener window,
then please tell me as early as possible...

I am waiting of your kind response....

Thanks & Regards
Brijendra

0
Georgi Tunev
Telerik team
answered on 12 Feb 2009, 02:53 PM
Hi Brijendra,

I am not sure that I understand you correctly. The code that you posted in your last reply, should not raise that error. If it indeed does - please open a support ticket and send me a full project that can be run locally so I can check it.
If you want to set the OnClientClose eventhandler from within the content page, please use the approach suggested in the other forum thread:


var oWnd = GetRadWindow(); 
var browserWin = oWnd.BrowserWindow; 
var fn = new browserWin.Function("sender","args""alert(sender + ' was closed');"); 
oWnd.add_close(fn); 




Greetings,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Window
Asked by
Brijendra Kumar
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Brijendra Kumar
Top achievements
Rank 1
Share this question
or