CallBackFnName fire before click at Ok button

2 posts, 0 answers
  1. Paulo Goncalves
    Paulo Goncalves avatar
    28 posts
    Member since:
    Aug 2004

    Posted 08 May 2013 Link to this post

    This code work before upgrade from 2012.3.1016.40 to 2013.1.417.40. Now the RadAjaxManager1_AjaxRequest fired before I click at Ok button. When click at 'Button1' the request is fired. I rerturn to 2012.3.1016.40 and the problem continue. Any idea ?

    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="cPanel_Default" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
    <head runat="server">
        <form id="form1" runat="server">
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
                <script type="text/javascript">
                    function confirmCallBackFn(arg) {
                        var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
                        return false;
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                    <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                            <telerik:AjaxUpdatedControl ControlID="Button1" />
            <telerik:RadWindowManager ID="RadWindowsManager1" runat="server" Title="Editar" Behaviors="Close,Move" VisibleStatusbar="false" style="z-index:90000" EnableEmbeddedSkins="false" ShowContentDuringLoad="true" ReloadOnShow="true" DestroyOnClose="true" >
            <asp:button ID="Button1" runat="server" text="Button" />

    Partial Class cPanel_Default
        Inherits System.Web.UI.Page
        Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
            RadWindowsManager1.RadConfirm("Callback ?", "confirmCallBackFn('Ok')", 300, 120, Nothing, "Test")
        End Sub
        Protected Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) Handles RadAjaxManager1.AjaxRequest
            If e.Argument = "Ok" Then Button1.Text = e.Argument
        End Sub
    End Class

  2. Paulo Goncalves
    Paulo Goncalves avatar
    28 posts
    Member since:
    Aug 2004

    Posted 09 May 2013 Link to this post

    Hi, the problem is fixed.

    To reuse the JS functions, I create an agument at callback function, the RadWindow don´t return error and execute callback function before click at Ok button.

    Te correct call is:
    RadWindowsManager1.RadConfirm("Callback ?", "confirmCallBackFn", 300, 120, Nothing, "Test")

    and I need one callbackfunction to each radconfirm

Back to Top