Error when call RadAlert

2 posts, 0 answers
  1. Osvaldo
    Osvaldo avatar
    2 posts
    Member since:
    Aug 2011

    Posted 06 Jul 2012 Link to this post

    I'm getting this error constantly: 

    This happens when I click in a RadButton that fires a RadAlert using this:

    DirectCast(Me.Page.FindControl("WindowManager"), RadWindowManager).RadAlert("Endereço foi salvo com sucesso.", 330, 100, "Sucesso", "alertCallBackFn")

    My WindowManager is:

    <telerik:RadWindowManager ID="WindowManager" runat="server" EnableShadow="true" EnableViewState="false" ReloadOnShow="true">
            <div class="rwDialogPopup radconfirm">
                <div class="rwDialogText">
                    <a onclick="$find('{0}').close(true);" class="rwPopupButton" href="javascript:void(0);"><span class="rwOuterSpan"><span class="rwInnerSpan">Sim</span></span></a> <a onclick="$find('{0}').close(false);" class="rwPopupButton" href="javascript:void(0);"><span class="rwOuterSpan"><span class="rwInnerSpan">Não</span></span></a>

    And my callback function It's:

    <telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">
        <script language="javascript" type="text/javascript">
            function alertCallBackFn(arg) {
            function GetRadWindow() {
                var oWindow = null;
                if (window.radWindow)
                    oWindow = window.radWindow;
                else if (window.frameElement.radWindow)
                    oWindow = window.frameElement.radWindow;
                return oWindow;
            function CloseRadWindow() {
                var oWindow = GetRadWindow();
                oWindow.argument = null;
                return false;

    All this code is on a page that is opened through RadWindow, and the error happens before the RadAlert it is shown.
  2. Slav
    Slav avatar
    1359 posts

    Posted 11 Jul 2012 Link to this post

    Hello Osvaldo,

    I tried to reproduce the described problem, but to no avail. You can find attached my test page. Please compare it with your actual project and check if there are differences in the setup. This screen capture demonstrates the behavior on my end, you can examine it and let me know if I have missed something.

    Note that the RadWindow alert dialog will be closed when the callback function is called, so it is not necessary to close it explicitly. This is why I removed the code for closing the window control from the sample and I replaced it with a standard alert which is called in the callback function.

    I will need to reproduce your scenario to be able to help you, as the cause for the problem you encountered cannot be determined via the provided information. This being said, please try modifying the attached sample so that the problem can be examined. If this is not possible, you can also prepare and send a simple, runnable project which isolates the issue so that I can inspect it locally and provide a more to the point answer. You will have to open a support ticket for this purpose.

    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top