ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Drop-down menus / WEBDEV
  • Overview
  • Page editor: defining the actions associated with the menu options
  • Code editor: defining the actions associated with the menu options
  • Display the events associated with a menu option
  • Events associated by default with menu options
  • Dynamic programming of menu options
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
Once the drop-down menu of your site is created, all you have to do is associate an action with each menu option.
Programming the menu options can be done:
  • In the page editor, in the option description.
  • In the code editor, by programming in WLanguage or in JavaScript.
Several WLanguage functions can also be used to programmatically handle menu options. For more details, see Menu management functions.
Remark: You have the ability to only program the ending options of the menu.
Page editor: defining the actions associated with the menu options
The action associated with the menu option is defined in the description window of the menu option.
Reminder: To display the description window of a menu option:
  1. Double-click the menu: a yellow border appears.
  2. Select the desired menu option.
  3. Open the context menu of the option and select "Option description".
Code editor: defining the actions associated with the menu options

Display the events associated with a menu option

To display the events associated with a menu option:
  1. Double-click the menu: a yellow border appears.
  2. Select the desired menu option.
  3. Open the context menu of the option and select "Code".
Two events are available:
  • Selecting the menu in browser code.
  • Selecting the menu in server code (available for the dynamic pages only).
In these events, the WLanguage functions can be used to:
Remark: These events are available:
  • for the ending options of the menu and submenus.
  • for the main options of the menu (the ones that expand the submenus).

Events associated by default with menu options

WEBDEV supports the following events by default (order of appearance in the code editor):
EventRuntime condition
Selection of option (Browser code)Run when the option is selected by the Web user.
Selection of option (Server code)Run when the option is selected by the Web user.
Remark: Only the browser codes are available in a static page.

Dynamic programming of menu options

The following WLanguage functions are used to dynamically handle the menu options of a page:
MenuAddMenuAdds a new menu to an existing drop-down or context menu of a window or page.
MenuAddOptionAdds a new option after the last option of a drop-down or context menu.
MenuAddPopupTransforms a menu option of a page in order for this option to open a popup.
MenuAddSeparatorAdds a new separator in a menu (drop-down or context menu).
MenuAddURLOptionAdds a new option after the last option of a drop-down or context menu. This menu option opens the page that corresponds to the specified URL.
MenuDeleteDeletes a menu or a menu option.
Minimum version required
  • Version 9
Comments
Click [Add] to post a comment

Last update: 04/12/2023

Send a report | Local help