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

RadWindow Child Window Close

5 Answers 162 Views
Window
This is a migrated thread and some comments may be shown as answers.
Sudeep
Top achievements
Rank 1
Sudeep asked on 17 Oct 2011, 12:30 PM
Hi,

I am using RadWindow control. I have set it's navigate url property which opens a new web page inside the pop-up window.
Now I want that after some server side operation the window must be closed.

In the pop-up window opened there is a Button Control which performs some action on its Click, so as the action performed completes the pop-up window should close. How can this be done..?

Kindly suggest me some solution as soon as possible.

Thanks

5 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 17 Oct 2011, 01:18 PM
Hello Sudeep,

You can try the following code snippet to achieve your scenario.
C#:
protected void submitbutton_Click(object sender, EventArgs e)  
{    
    // some server side code. 
    string script = "<script language='javascript' type='text/javascript'>Sys.Application.add_load(Close);</script>"
    ClientScript.RegisterStartupScript(this.GetType(), "Close", script);     
}

Javascript:
function CloseAndRedirect(sender, args)      
{          
    GetRadWindow().close();       //closes the window      
}

Thanks,
Princy.
0
Sudeep
Top achievements
Rank 1
answered on 19 Oct 2011, 07:09 AM
Thank you Princy for your reply.

But this solution didn't work in my project.
I'm using DotNetNuke (DNN).

In Javascript "GetRadWindow().close();" gives an error. (The screen shot is attached)

Kindly suggest me some other solution.


Thanks,
Sudeep
0
Sudeep
Top achievements
Rank 1
answered on 19 Oct 2011, 07:10 AM
Thank you Princy for your reply.

But this solution didn't work in my project.
I'm using DotNetNuke (DNN).

In Javascript "GetRadWindow().close();" gives an error. (The screen shot is attached)

Kindly suggest me some other solution.


Thanks,
Sudeep
0
Stuart Hemming
Top achievements
Rank 2
answered on 19 Oct 2011, 07:58 AM
Sudeep,

Forgive me if I've mis-read it, but your screen shot seems to suggest you are calling .Close() rather than .close(). Javascript is case-sensitive.

-- 
Stuart
0
Sudeep
Top achievements
Rank 1
answered on 19 Oct 2011, 12:28 PM
Stuart,

I'm calling close() rather than Close().
But the Error Console is showing the error as Close().

There's some other problem with the radWindow not working as desired.

Kindly help...!!

--
Sudeep
Tags
Window
Asked by
Sudeep
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Sudeep
Top achievements
Rank 1
Stuart Hemming
Top achievements
Rank 2
Share this question
or