free hosting   image hosting   hosting reseller   online album   e-shop   famous people 
Free Website Templates
Free Installer

Dropdown Menu
With Description Box



This script is similar to Dropdown Menu With Status Line Description , except this uses a text area for the description.


Paste all the code below in the body of your page, modifying the links and descriptions to suit:
The above script will open all links in the same window.

To open them in a new window, replace the gothere() section with:

How It Works

For a full explanation of how dropdown menus work, see Dropdown Menu

This script uses the same techniques, with the addition of the description box:
<textarea rows=5 cols=21 wrap="virtual" name="text"></textarea>
The inclusion of wrap="virtual" creates automatic word wrapping inside the text area.

Each description is included in an array, descriptions[x], where x is the index of the menu item.

In the example here, if the first item is selected - Google - its index is 0.

This corresponds to the description "Excellent search engine".

The function showtext writes this description to the text area box, using the command:
shortcut.text.value=descriptions[shortcut.example.selectedIndex]
where
[shortcut.example.selectedIndex] is the index of the item clicked

If you wish to include more links, simply add extra options at the top of the form.

Then add the corresponding comments for the text area box in the descriptions array.

For longer descriptions, increase the rows and cols parameters of the text area.


Try It Out

Click on a menu item to see the description in the box.

Then click the Go! button to go to the site.

All links will open in a new window.






© 2001 CyberSchool