Home » Documentation » Alert

Alert

This object allows for a convenient approach for storing and outputting notifications.

Constructors

Name Description
Constructor  Initializes a new instance of the Alert class.

Methods

Name Description
Add  Creates a new item in the Alerts property of this instance with the specified string argument.
Arguments:
(Value)
Count  Returns the count of items in the Alerts property of this instance.
Item  Returns an item of the Alerts property at the specified index.
Arguments:
(Index)
ToArray  Returns all items in the Alerts property in this instance as a string array.
ToJSON  Returns all items in the Alerts property in this instance as a JSON object.

Properties

Name Description
Alerts  Stores all items in this instance.

Examples

 Example in Javascript:
var UnitAlert = new WebLegs.Alert();

UnitAlert.Add("This is \"alert\" item #1");
UnitAlert.Add("This is \"alert\" item #2");
UnitAlert.Add("This is \"alert\" item #3");
UnitAlert.Add("This is \"alert\" item #4");

for(var i = 0 ; i < UnitAlert.Count() ; i++) {
	document.write(UnitAlert.Item(i) +"<br/>");
}
Are you a robot?
Your Email:
Create a Username:
Create a Password:
Forgot Password?
Validate Text: Captcha