Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Sys,loader is undefined

$
0
0

Hi All 

I am doing some sample code to understand Sys.loader.registerScript. Here is the code

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"><title></title><script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script></head><body><form id="form1" runat="server"><asp:ScriptManager runat="server"></asp:ScriptManager><a href="#">Click Me</a></form><script type="text/javascript">
        function execute() {
            alert("hi");
        }$(document).ready(
            function () {                $("a").click(
                    function () {
                        if (window.Sys && Sys.loader) {
                            Sys.loader.registerScript("MyScript", null, execute);
                            alert("Lazy loading");
                        }
                        else {
                            execute();
                        }
                    });
            });</script></body></html>

But Sys.loader is undefined. Could you please help


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>