Creating a Dynamic List/Menu

The Dynamic List/Menu Server Behavior is functionality that is built into Dreamweaver MX/UltraDev; it allows you to populate a list/menu from a recordset that you have created. It is used to populate the Parent List with the appropriate options from the database.

For more information on creating Dynamic Lists/Menus, see Using Dreamweaver > Adding Dynamic Content > Making form objects dynamic.

Before implementing this server behavior, you will need to have added a form and Parent List to your web page, as well as create your database and the necessary Parent recordset. Please refer to the previous lessons in this section to prepare to use this server behavior.

To insert the Dynamic List/Menu server behavior for your Parent list:

  1. Select your Parent List on the page
  2. Click the plus (+) button in the Server Behaviors panel group and select Dynamic Elements > Dynamic List/Menu.
  3. From the recordset list, select the recordset that retrieves the information for your Parent list from the database.
  4. In the Get Labels From: list, select the recordset column that provides the list selections for your Parent List (e.g. ParentText).
  5. In the Get Values From: selection list, specify the Recordset column which provides the unique id for each Parent list option in the database (e.g. ParentID).
  6. In the Select Value Equal To: field, specify any comma separated values that are to be selected in the list on the load of the page. These values should correspond to the unique id for the records populating the list ParentID or values for static options. See Using List/Menu Form Elements.
  7. Click OK to apply the server behavior.