Skip to end of metadata
Go to start of metadata

The onoptionclick event activates when a menu option on the Menu widget is clicked.  Two variables will be pre-set by the menu widget so you can use them inside your JavaScript code for the event:

  • value - the choice value of the selected menu option
  • text - choice text of the selected menu option

Example:

You could set your widget property to call a JavaScript function, and pass the 'value' variable that was pre-set by Profound UI as a parameter.

Then, in a separate JavaScript file you could code this function that will have all of the code to handle the menu options:

Note:

When using onoptionclick, you are handling the response manually with JavaScript entered in the onoptionclick event, rather through the “menu response” property. The automatic submit (response) and the JavaScript click event are mutually exclusive. You can either have an automatic submit/response, or the custom JavaScript event. If you wish to use the 'menu response' property please ensure the onoptionclick event is completely blank.

Labels
  • No labels