Actions  -  Drop-Down Menu

The menu above has a set of links to other pages in the Workbench Site. The button to the right has a pair of Actions associated with it which will cause you to jump to the appropriate page... Try it out once, then click on the “Back” button in your browser to see how it works.

Here’s how it works: The button on the right has an Action to “Get” the link information from the drop-down menu on the left (which is populated by URLs - relative links in this case, but you could use absolute links if you wanted to), and an Action which then tells the browser to go to the URL which is selected from the drop-down menu.

  1. Create a Form area on your page - A text area, layout area or table with the “(Text/Table/Layout) is a Form” checkbox checked
  2. Create a drop-down menu item (also known as a “Combo Box”) in the Form area
    Populate it with the URLs you want to use - you can use either absolute or relative pathing here)
  3. Place an Forms Button object on your page in the Form area - this will be your “Go” button.
    Make the text in the button “Go” (or anything else you want).
    Select the Button type “Button” in the Properties window.
  4. Create two Actions for this “Go” button:


    Name: GetURL
    When -> Mouse -> Clicked
    Target -> (Drop Down Menu)
    Message -> Get Properties -> Get Selected Value
     

    make sure this action is named “GetURL” ( you’ll see why below) and uncheck the checkbox next to the Action name in the Actions list.


    When -> Mouse -> Clicked
    Target -> (Layout Area)
    Message -> Location -> Go to URL
    Parameter(s) -> Expression...
     

    and in the “Expression” window that appears, click on the “Insert Action” button and select GetURL (the first Action you created). This will insert the following text into the Expression window:

    $(GetURL)

    and click “OK”... that’s it, you’re done! You now have a drop-down menu created using Actions.

This menu does *not* target Frames - to target a specific frame, change the Target setting in the action immediately above to be the MasterBorder or Body Layout area (see the Frames & Actions Note for explanations)

Click here to take a look at screenshots to see how this was done.

Note:  All Actions described in this section have been tested with Fusion 3.x, 4.x, 5.x and MX.
           Actions will not currently work properly when viewed with Netscape 6.0

Go Back to Previous Page

Have a question that you can´t find the answer to? Want to report a possible bug?

Send a help request to NetObjects Technical Support