advertisement -- please support sponsors

navigation:
navigating with pull-down menus

Hello, any ideas how to create a javascript pull down menu, where you dont need that ugly button, designed to shoot the links contents into another frame?

In the tag for the select box, include an onChange event handler that responds to the user's selection. This event handler should call a function, such as update_target_frame (), whose purpose is to determine which item in the select box was selected, and then to load the appropriate document into the destination frame.

The opening select box tag might look like this:

<select name=link_selector onChange="update_target_frame ();">

When the user selects an item on the select box, the update_target_frame () function will be called. This function should do two things:

  1. Determine the value of the selected item, and
  2. load the appropriate document into the target frame.

Information on how to determine which item is selected can be found in another article on this web site, Context-Sensite Select Boxes.

After you have determined which item was selected and which document to load, obtain a reference to the target frame and assign the new URL to its location property:

parent . frames [frame_number] . location = new_URL

At this point, the target frame will begin loading the new document.

Charlton Rose
29 August 1997