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

Using radalert.

2 Answers 132 Views
Window
This is a migrated thread and some comments may be shown as answers.
Swapna M
Top achievements
Rank 1
Swapna M asked on 06 Apr 2010, 09:02 AM
Hi,
        I am using radalert in javascript as below.

radalert("Saved Successfully.", 400, 150,

"Title");

 

window.location.href =

"Common.aspx";

Here the problem is before i click on OK button shown in Radalert, it is getting redirected to Common.aspx.
How to avoid this? I want to remain in the same page till i click on OK.

Note: This doesnt happen in default alert.

Thank You.

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Georgi Tunev
Telerik team
answered on 06 Apr 2010, 10:37 AM
Hi Swapna M,

You could use the add_close() function:

<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<telerik:RadWindowManager ID="RadWindowManager1" runat="server">
</telerik:RadWindowManager>
<button onclick="alertAndRedirect(); return false;">
    call radalert and redirect</button>
 
<script type="text/javascript">
    function alertAndRedirect()
    {
        var oWnd = radalert("You will be redirected to Google");
        oWnd.add_close(function() { window.location.href = "http://www.google.com"; });
    }
 
</script>
 
</form>


All the best,
Georgi Tunev
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.
0
Swapna M
Top achievements
Rank 1
answered on 06 Apr 2010, 10:56 AM
Thanks Tunev. It worked :)
Tags
Window
Asked by
Swapna M
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Swapna M
Top achievements
Rank 1
Share this question
or