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

Onclientclose and AjaxRequest not firing problem

3 Answers 134 Views
Window
This is a migrated thread and some comments may be shown as answers.
Neal
Top achievements
Rank 1
Neal asked on 01 Oct 2009, 10:39 AM
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

3 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 01 Oct 2009, 12:49 PM
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.
0
Neal
Top achievements
Rank 1
answered on 07 Oct 2009, 09:35 AM
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

0
Georgi Tunev
Telerik team
answered on 07 Oct 2009, 10:09 AM
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.
Tags
Window
Asked by
Neal
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Neal
Top achievements
Rank 1
Share this question
or