I am following this tutorial here and created a page but popup won't show when I click the button. I am getting javascript error sys is undefined.
Tutorial: http://demos.telerik.com/aspnet-ajax/window/examples/modalpopup/defaultcs.aspx
aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="FNA.NRTT.Website.Customer.Portfolio.Default" %><%@ Register TagPrefix="nrtt" TagName="CustomerGrid" Src="~/UserControls/CustomerGrid.ascx" %><%@ Register TagPrefix="nrtt" TagName="DisplayClientDefinedField" Src="~/UserControls/DisplayClientDefinedField.ascx" %><asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server"></asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server"></asp:Content><asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server"> <h2><asp:Literal ID="ltPageTitle" runat="server" Text="<%$ Resources:NrttLanguage, Portfolio %>"></asp:Literal></h2> <nrtt:DisplayClientDefinedField runat="server" ID="ucDisplayCDFS" OnNeedCdfDefinitions="ucDisplayCDFS_NeedCdfDataDefinition" OnFilterChanged="ucDisplayCDFS_FilterCDFS"/> <asp:Button ID="rbEdit" Text="Edit" runat="server"/> <nrtt:CustomerGrid ID="ucExpiringRealServices" runat="server" AllowSelection="true" OnNeedDataSource="ucExpiringRealServices_NeedDataSource" OnNeedColumnCollection="ucExpiringRealServices_NeedColumnCollection" OnItemDataBound="ucExpiringRealServices_ItemDataBound" ></nrtt:CustomerGrid> <telerik:RadWindow ID="modalPopup" runat="server" Width="360px" Height="360px" Modal="true" OffsetElementID="main"> <ContentTemplate> <div style="padding: 10px; text-align: center;"> <telerik:RadButton ID="rbToggleModality" Text="Toggle modality" OnClientClicked="togglePopupModality" AutoPostBack="false" runat="server" Height="65px" /> </div> <p style="text-align: center;"> RadWindow is designed with keyboard support in mind - try tabbing before and after removing the modal background. While the popup is modal you cannot focus the text area, once the modality is removed the text area will be the first thing to receive focus because it has tabIndex=1. </p> </ContentTemplate> </telerik:RadWindow> </asp:Content>
javascript:
var demo = {};function togglePopupModality() { var wnd = getModalWindow(); wnd.set_modal(!wnd.get_modal()); if (!wnd.get_modal()) { document.documentElement.focus(); }}function showDialogInitially() { var wnd = getModalWindow(); wnd.show(); Sys.Application.remove_load(showDialogInitially);}Sys.Application.add_load(showDialogInitially);function getModalWindow() { return $find(demo.modalWindowID); }global.$modalWindowDemo = demo;global.togglePopupModality = togglePopupModality;