The Alert behavior displays an alert or confirm message box. If an alert is displayed, processing is stopped after the box is dismissed. If a confirm is displayed, processing is stopped if the user chooses "Cancel" (or "No").
<input type="submit" >
<input type="reset" >
<input type="button" >
<input type="image" >
hX_5.addBehavior("id", "onclick", new hX_5.JSFBehaviorAlert(attributes)); where
id |
The ID of the HTML tag to which the component is attached. |
attributes |
Comma separated list of attributes where each attribute is a quoted string consisting of the attribute name and value separated by a colon, for example "label:MyLabel". |
Event |
Description |
---|---|
onclick |
Use is private to the implementation of the <hx:panelActionbar> |
Attribute name |
Description |
---|---|
message |
The message to display. |
prompt-type |
0 displays an alert message box. 1 displays a confirm message box. |
Runs after any other handlers provided for the event.
Stops the event continuing/bubbling if action is alert, otherwise stops the event if the confirm is "No".
API call |
Description |
---|---|
object = setAttribute(attribute) |
Sets an attribute or changes its value (if it was set previously). |
string = getAttribute(attribute-name) |
Retrieves the current value of an attribute. |
When a button is clicked, confirm that a user wants to the submit to happen.
hX.addBehavior("form1:button1c", "onclick", new hX.JSFBehaviorAlert("message:Submit this page?","prompt-type:1" ));