Error sys is undefined

3 posts, 1 answers
  1. Aniket
    Aniket avatar
    12 posts
    Member since:
    Dec 2015

    Posted 28 Dec 2015 Link to this post

    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;

  2. Aniket
    Aniket avatar
    12 posts
    Member since:
    Dec 2015

    Posted 29 Dec 2015 in reply to Aniket Link to this post

    I am also following this to update web.config but updating web.config won't work.

     http://ajax.asp.net/ajax/documentation/live/ConfiguringASPNETAJAX.aspx#systemwebserver

  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Answer
    Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 30 Dec 2015 Link to this post

    Hello,

    Take a look to the following links for more information about this error - Common reasons for the ‘Sys is undefined’ error in ASP.NET Ajax applications: http://www.telerik.com/blogs/common-reasons-for-the-lsquo-sys-is-undefined-rsquo-error-in-asp-net-ajax-applications and General Troubleshooting article: 
    http://docs.telerik.com/devtools/aspnet-ajax/general-information/troubleshooting/general-troubleshooting#error-message-microsoft-jscript-runtime-error-sys-is-undefined

    Regards,
    Pavlina
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
Back to Top