Skip to main content
Version: 3.5

JavaScript

Namespace: Wisej.Web

Assembly: Wisej.Framework (3.5.0.0)

Allows controls to execute javascript code.

public class JavaScript : Component, IExtenderProvider

Constructors

Instance memberJavaScript()

Initializes a new instance of the JavaScript without a specified container.

Instance memberJavaScript(container)

Initializes a new instance of the JavaScript class with a specified container.

NameTypeDescription
containerIContainerAn IContainer that represents the container of the JavaScript extender.

Properties

Instance memberTag

Object: Returns or sets the object that contains programmer-supplied data associated with the JavaScript extender. (Default: null)

Methods

Instance memberCanExtend(target)

Returns true if the JavaScript extender can offer an extender property to the specified target component.

ParameterTypeDescription
targetObjectThe target object to add an extender property to.

Returns: Boolean. true if the JavaScript class can offer one or more extender properties; otherwise, false.

Instance memberClear()

Removes all scripts.

Instance memberGetJavaScript(control)

Retrieves the JavaScript code associated with the specified control. The JavaScript code will be execute on the client when the control is created or refreshed.

ParameterTypeDescription
controlControlThe Control for which to retrieve the JavaScript code.

Returns: String. A String containing the javascript code for the specified control.

Instance memberGetJavaScriptEvents(control)

Returns the collection of JavaScript event handlers associated with the control.

ParameterTypeDescription
controlControlThe Control to attach the JavaScript event handlers to.

Returns: ClientEventCollection.

Instance memberGetJavaScriptSource(control)

Retrieves the JavaScript file associated with the specified control. The JavaScript code will be execute on the client when the control is created or refreshed.

ParameterTypeDescription
controlControlThe Control for which to retrieve the JavaScript file.

Returns: String. A String containing the name of the javascript file for the specified control.

Instance memberSetJavaScript(control, script)

Associates JavaScript code with the specified control.

ParameterTypeDescription
controlControlThe Control to associate the JavaScript with.
scriptStringThe JavaScript code to execute when the control is created.

Instance memberSetJavaScriptSource(control, file)

Associates JavaScript file with the specified control.

ParameterTypeDescription
controlControlThe Control to associate the JavaScript file with.
fileStringThe JavaScript file to execute when the control is created.

Implements

NameDescription
IWisejComponentAll wisej components implement this interface.
IWisejSerializableAllows an object to serialize itself.