Onclientclose and AjaxRequest not firing problem

4 posts, 0 answers
  1. Neal
    Neal avatar
    114 posts
    Member since:
    Apr 2008

    Posted 01 Oct 2009 Link to this post

    Hi All,

    I've tried it all as per the forums and demos but,..??  I just can't get the RadAjaxManager's  AjaxRequest ex the RadWindow's onclientclose event to fire.
    Any ideas, have i missed something dumb??
    Telerik version is 2009.1 


    I have

    <

     

    telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"

     

     

    onajaxrequest="RadAjaxManager1_AjaxRequest"

     

     

    Style="position: relative"

     

     

    DefaultLoadingPanelID="RadAjaxLoadingPanel1">

     

     

    <AjaxSettings>

     

     

    <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">

     

     

    <UpdatedControls>

     

     

    <telerik:AjaxUpdatedControl ControlID="aspNavPanel" />

     

     

    </UpdatedControls>

     

     

    </telerik:AjaxSetting>

     

     

    </AjaxSettings>

     

     

    </telerik:RadAjaxManager>

    The aspNavPanel (the updated control) is an ASP panel inside a radsplitter which wraps my Navigation RadPane and it's dbound radmenu.
    The javascript is ( within the Body of the form.)

     

     

    <telerik:RadCodeBlock ID="radcodeblock1" runat="server">
    <script language="javascript" type="text/javascript">

     

     

     

     

     

     

     

     

        function OnClientClose()

     

        {

            $find(

    "<%=RadAjaxManager1.ClientID%>").ajaxRequest();

     

     

        } ; 

     

     

        function Login()

     

        {

     

            if (<%= Show %> == true)

     

            {

     

                var urlExtn = "ms=" + new Date().getTime();

     

     

                var oWnd = radopen("Forms/Auth/Login.aspx?" + urlExtn , "Login");

     

                oWnd.add_close(OnClientClose);

            }

        };

     

     

    </script>

     

     

    </telerik:RadCodeBlock>

    i have tried this as well

     

     

    <telerik:RadWindowManager

     

     

    ID="RadWindowManager1"

     

     

     

    runat="server" >

     

     

     

     

     

     

     

    <Windows>

     

     

     

    <telerik:RadWindow

     

     

    ID="Login"

     

     

    runat="server"

     

     

     

    Width="600px" Height="245px"  Top="250" Left="400" BackColor="lightgray"

     

     

     

     

     

     

    Modal="true"

     

     

    KeepInScreenBounds="true"

     

     

    Overlay="true"

     

     

    OnClientClose="OnClientClose">

     

     

     

    </telerik:RadWindow>

     

     

     

    </Windows>

     

     

    </telerik:RadWindowManager>

    and .cs is

     

     

    protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)

     

    {

        BindMenu();

    }


    TIA
    Neal

  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 01 Oct 2009 Link to this post

    Hi Neal,

    Try changing the name of the Login() function so it doesn't match the name of the RadWindow - this could be a reason for the problem. Other than that, the code seems OK. If you still experience problems after that - just open a support ticket and send me a sample project so I could check it.


    All the best,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Neal
    Neal avatar
    114 posts
    Member since:
    Apr 2008

    Posted 07 Oct 2009 Link to this post

    hi Georgi,

    I've tried allsorts, and found the following.

    There is an error "Object null or does not support this"  in the LoginWin() script. called on  Page Load, from within the Body Tag.

    It turns out, it is the radopen which is causing problems. ?? go figure??  (with or without the "IE7" urlExtn cache obfuscator in)
    With or without the RadCodeBlock and/or the Ajaxmanager, and of course if there are errors in the page, then the page does not run as expected. ..i.e. the RadAjaxManager etc

    i.e.

     

    function LoginWin()

     

    {

     

        if (<%= Show %> == true)

     

        {

     

             var urlExtn = "ms=" + new Date().getTime();

     

     

             var oWnd = radopen("Forms/Auth/Login.aspx?" + urlExtn

     

                                               ,

    "Loginform" );

     

        }

    }



    It happens on my "Default.aspx" which onload tries to open the login window. and of course useRad Ajaxmanager to fire the code behind event to bind the menus in the default.aspx, given a successful login.

    I've used probably a hundred RadWindows tillnow, but never before on PageLoad,
    Any Ideas?  please
    thanks Neal

  4. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 07 Oct 2009 Link to this post

    Hello Neal,

    In this case, please open a support ticket and send me a sample project that reproduces your setup and the problem itself. I will examine it thoroughly and do my best to provide you with a solution as soon as possible.


    Kind regards,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top