// JavaScript
Alert1.onclick = function() {
NSB.MsgBox("You can display a message or take other action when clicked");
};
(8 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
== Description == | == Description == | ||
Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages. | |||
By setting the appearance, alerts can have different colors. Turning dismissable on will add an x to the control. Clicking on it will cause the alert to be hidden, and your app will reformat to use the space which has been freed up. | |||
== Properties and Methods == | == Properties and Methods == | ||
Line 7: | Line 11: | ||
Standard [[properties and methods|properties]] are supported, plus: | Standard [[properties and methods|properties]] are supported, plus: | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
| value || The title of the button. Design time or runtime. | | appearance || Appearance of the alert. Can be success, info, warning, danger. | ||
|- | |||
| badge || Adds a Badge to the alert. | |||
|- | |||
| dismissable || Add an x to dismiss the alert? | |||
|- | |||
| value || The title of the button. HTML OK. Design time or runtime. | |||
|} | |} | ||
Line 16: | Line 25: | ||
Standard [[events|events]] are supported. For this control, the onclick event will be most useful. | Standard [[events|events]] are supported. For this control, the onclick event will be most useful. | ||
== Example | == Example == | ||
== | <tabber> | ||
JavaScript= | |||
<syntaxhighlight lang="JavaScript"> | |||
// JavaScript | |||
Alert1.onclick = function() { | |||
NSB.MsgBox("You can display a message or take other action when clicked"); | |||
}; | |||
</syntaxhighlight> | |||
|-| | |||
BASIC= | |||
<syntaxhighlight lang="vb.net"> | |||
' Basic | |||
FFunction Alert2_onclick() | |||
MsgBox "You can display a message or take other action when clicked" | |||
End Function | |||
</syntaxhighlight> | |||
</tabber> | |||
== Output == | == Output == | ||
[[Category:Language Reference]] | [[Category:Language Reference]] | ||
Line 32: | Line 54: | ||
[[Category:Bootstrap]] | [[Category:Bootstrap]] | ||
Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages.
By setting the appearance, alerts can have different colors. Turning dismissable on will add an x to the control. Clicking on it will cause the alert to be hidden, and your app will reformat to use the space which has been freed up.
Standard properties are supported, plus:
appearance | Appearance of the alert. Can be success, info, warning, danger. |
badge | Adds a Badge to the alert. |
dismissable | Add an x to dismiss the alert? |
value | The title of the button. HTML OK. Design time or runtime. |
Standard events are supported. For this control, the onclick event will be most useful.
// JavaScript
Alert1.onclick = function() {
NSB.MsgBox("You can display a message or take other action when clicked");
};
' Basic
FFunction Alert2_onclick()
MsgBox "You can display a message or take other action when clicked"
End Function