RadWindow Child Window Close

6 posts, 0 answers
  1. Sudeep
    Sudeep avatar
    6 posts
    Member since:
    Sep 2011

    Posted 17 Oct 2011 Link to this post

    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
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 17 Oct 2011 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Sudeep
    Sudeep avatar
    6 posts
    Member since:
    Sep 2011

    Posted 19 Oct 2011 Link to this post

    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
  5. Sudeep
    Sudeep avatar
    6 posts
    Member since:
    Sep 2011

    Posted 19 Oct 2011 Link to this post

    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
  6. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 19 Oct 2011 Link to this post

    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
  7. Sudeep
    Sudeep avatar
    6 posts
    Member since:
    Sep 2011

    Posted 19 Oct 2011 Link to this post

    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
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017