EditClient Libraries
Client-side Javascript libraries available in Dialogue Script:
EditShortcuts
Shortcuts extend the ECMAScript (JavaScript) Global object and other core objects.
Shortcut Example
// Add handler using the getElementById method
$addHandler(Sys.UI.DomElement.getElementById("Button1"), "click", toggleCssClassMethod);
// Add handler using the shortcut to the getElementById method
$addHandler($get("Button2"), "click", removeCssClassMethod);
EditSys.StringBuilder
Provides a mechanism to concatenate strings.
Methods
append Method
Appends a string to the end of the StringBuilder instance.
appendLine Method
Appends a new string with a line terminator to the end of the StringBuilder instance.
clear Method
Clears the contents of the StringBuilder instance.
isEmpty Method
Determines whether the StringBuilder instance has any content.
toString Method
Creates a string from the contents of a StringBuilder instance.
<script type="text/javascript">
function buildAString(title){
var headTagStart = "<head>";
var headTagEnd = "</head>";
var titleTagStart = "<title>";
var titleTagEnd = "</title>";
var sb = new Sys.StringBuilder(this._headTagStart);
sb.append(titleTagEnd);
sb.append(title);
sb.append(titleTagEnd);
sb.append(headTagEnd);
// Displays: "The result: <head><title>A Title</title></head>"
alert("The result" + sb.toString());
}
var title = "A Title";
buildAString(title);
</script>