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

Radwindow close

2 Answers 59 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
geetha priya
Top achievements
Rank 1
geetha priya asked on 21 May 2010, 11:56 AM
hi,

how to close a radwindow on radalert ok button click.
thanks in advance..

2 Answers, 1 is accepted

Sort by
0
Accepted
Petio Petkov
Telerik team
answered on 21 May 2010, 03:31 PM
Hello,

The code below illustrates how to close a RadWindow when RadAlert is closed:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<head runat="server">
    <title></title>
    <script type="text/javascript">
        function ShowAlert()
        {
            //show alert
            var oWnd = radalert('CustomText', 330, 100, 'RadAlert custom title');
            //Attach RadAlertClosed event handler to the close event
            oWnd.add_close(RadAlertClosed);
            return false;
        }
        function RadAlertClosed(obj, args)
        {
            // get the RadWindow with clientID RadWindow1
            var window1 = $find("RadWindow1");
            //close RadWindow1
            window1.close();
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server"/>
      
    <div>
      <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
        <Windows>
            <telerik:RadWindow ID="RadWindow1" NavigateUrl="http://www.google.com" VisibleOnPageLoad="true"></telerik:RadWindow>
        </Windows>
      </telerik:RadWindowManager>
      <input type="button" value="showAlert" onclick="ShowAlert()"/>
  
    </div>
    </form>
</body>
</html>
Hope this helps.

Greetings,
Petio Petkov
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
geetha priya
Top achievements
Rank 1
answered on 25 May 2010, 11:53 AM
thanks it works fine...
Tags
Ajax
Asked by
geetha priya
Top achievements
Rank 1
Answers by
Petio Petkov
Telerik team
geetha priya
Top achievements
Rank 1
Share this question
or