Triggering Arbitrary JavaScript, Alerts and Confirms

QCubed includes several commonly used Javascript-based actions:
  • QAlertAction - to display a javascript "alert" type of dialog box
  • QConfirmAction - to display a javascript "confirm" type of dialog box, and execute following optional actions if the user hits "Ok"
  • QJavaScriptAction - to run any arbitrary javascript command(s)
The example below shows three different QButton controls which use all three of these action types.

Specifically for the QJavaScriptAction, we've defined a simple SomeArbitraryJavaScript() javascript function on the page itself, so that the button has some javascript to perform.

If you are interested in more advanced and flexible types of confirmation or prompts, take a look at the plugin that offers pre-built QDialogBox subclasses.

Click on the "QConfirmAction Example" button to change.