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

Redirect via Radconfirm

1 Answer 90 Views
Window
This is a migrated thread and some comments may be shown as answers.
Bill
Top achievements
Rank 2
Bill asked on 08 Jun 2010, 09:07 PM
I want to be able to simply redirect to another page providing the value coming back from the radconfirm is a "Yes". However, when the server side script executes, the page just hangs. What am I missing?

I have the following code in a server side button click event:
<code>
RadAjaxManager1.ResponseScripts.Add("radconfirm('No more EDLogs exist for the remaining Chart files. Do you want to be redirected to the page where you can enter more EDLogs?', confirmCallBackEDLogFn);"); 
</code>

I have the following code in my html:
<code>

<telerik:RadWindowManager ID="RadWindowManager1" runat="server">
    </telerik:RadWindowManager>

    <script type="text/javascript">
        function confirmCallBackChartFn(arg)
            {
                if(arg == "Yes")
                    {
                       window.location.href = "../scan/viewchart.aspx"; // Set the url to redirect
                    }
            }
           
        function confirmCallBackEDLogFn(arg)
            {
                if(arg == "Yes")
                    {
                       window.location.href = "../scan/viewchart.aspx"; // Set the url to redirect
                    }
            }
    </script>

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" UpdatePanelsRenderMode="Inline">
        <AjaxSettings>
             <telerik:AjaxSetting AjaxControlID="chkBulk">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="chkBulk" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadGridEDLogFiles">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGridEDLogFiles" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="chkEDLog">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="chkEDLog" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
    </telerik:RadAjaxLoadingPanel>
</code>

1 Answer, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 14 Jun 2010, 10:44 AM
Hello William,

In your case I recommend you to use this approach in order to open a radconfirm dialog from the server. Also, you need to change this check:
function confirmCallBackEDLogFn(arg)
{
   if(arg == "Yes")
   {
     window.location.href = "../scan/viewchart.aspx"; // Set the url to redirect
   }
}

to looks like this :
function confirmCallBackEDLogFn(arg)
{
   if(arg)
   {
     window.location.href = "../scan/viewchart.aspx"; // Set the url to redirect
   }
}

This is because the radconfirm returns a Boolean value.

I hope this helps.

Greetings,
Fiko
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Window
Asked by
Bill
Top achievements
Rank 2
Answers by
Fiko
Telerik team
Share this question
or