// Name: AjaxControlToolkit.NoBot.NoBotBehavior.debug.js // Assembly: AjaxControlToolkit // Version: 3.0.30930.28736 // FileVersion: 3.0.30930.0 // (c) Copyright Microsoft Corporation. // This source is subject to the Microsoft Public License. // See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL. // All other rights reserved. /// /// /// /// Type.registerNamespace("AjaxControlToolkit"); AjaxControlToolkit.NoBotBehavior = function(element) { /// /// The NoBotBehavior is used to evaluate JavaScript on the client /// to ensure they are running from within a browser /// /// /// DOM Element to associate the behavior with /// AjaxControlToolkit.NoBotBehavior.initializeBase(this, [element]); this._ChallengeScript = ""; } AjaxControlToolkit.NoBotBehavior.prototype = { initialize : function() { /// /// Initialize the behavior /// AjaxControlToolkit.NoBotBehavior.callBaseMethod(this, "initialize"); // Evaluate challenge script and store response in ClientState var response = eval(this._ChallengeScript); AjaxControlToolkit.NoBotBehavior.callBaseMethod(this, "set_ClientState", [response]); }, dispose : function() { /// /// Dispose the behavior /// AjaxControlToolkit.NoBotBehavior.callBaseMethod(this, "dispose"); }, get_ChallengeScript : function() { /// /// JavaScript to be evaluated /// return this._ChallengeScript; }, set_ChallengeScript : function(value) { if (this._ChallengeScript != value) { this._ChallengeScript = value; this.raisePropertyChanged('ChallengeScript'); } } } AjaxControlToolkit.NoBotBehavior.registerClass("AjaxControlToolkit.NoBotBehavior", AjaxControlToolkit.BehaviorBase); // getDescriptor : function() { // var td = AjaxControlToolkit.NoBotBehavior.callBaseMethod(this, "getDescriptor"); // td.addProperty("ChallengeScript", String); // return td; // }, if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();