Help Desk
By Christopher Schmitt, Guest Webmaster
Drop-Down Dilemma
Dear Help Desk,
I use drop-down menus for navigation on my framed site, as they let users hop around my site's content. How can I include forward and back buttons in addition to the drop-down menu for people who want to surf the site linearly?
- Dee
Dear Dee,
Drop-down menus are an excellent way to provide a supplemental means of navigation. Their effectiveness is also their downfall. How so? Drop-down menus provide a way for users to hop from section to section of a Web site. Granted, if you provide the list in the drop-down menu in a linear fashion, a user might actually go through your entire site. But in reality, users get bored or distracted easily thanks to our ever-shrinking attention spans.
To help a user fully explore your content, you can provide Next and Back buttons as well as the drop-down menu. The script in
Listing 1 should help you do this.
First, the makeArray object is really for older Web browsers that don't support true arrays. You should modify the items in the pages and urls arrays to match the titles and URLs of actual pages on your site.
Next, the script sets up the variable for the page number. The page number changes as a user interacts with the drop-down menu, Next button, or Back button. The page number is initially set to 0, because we are assuming the user will be arriving at the entry point for navigation.