Home Messages Index
[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index

Re: JavaScript Drop-down Navigation

  • Subject: Re: JavaScript Drop-down Navigation
  • From: Roy Schestowitz <newsgroups@schestowitz.com>
  • Date: Sat, 30 Jul 2005 07:46:56 +0100
  • Newsgroups: comp.infosystems.www.authoring.html
  • Organization: schestowitz.com / Manchester University
  • References: <zdAGe.28503$mC.7526@okepread07> <dceqmq$2c86$1@godfrey.mcc.ac.uk> <Xns96A2D8B942BF5arbpenyahoocom@>
  • Reply-to: newsgroups@schestowitz.com
  • User-agent: KNode/0.7.2
Adrienne wrote:

> Gazing into my crystal ball I observed Roy Schestowitz
> <newsgroups@schestowitz.com> writing in
> dceqmq$2c86$1@godfrey.mcc.ac.uk:">news:dceqmq$2c86$1@godfrey.mcc.ac.uk:
>> Yeah wrote:
>>> I wish to use a drop box where each Option will not take the user to a
>>> web page - but a certain location on the same page the drop box
>>> exists. For example, Option 1 would take the user to "Chapter 1",
>>> Option 2 would be "Chapter 2", and so on. All destinations are on the
>>> same page.
>>> I already have <A NAME="#ChapterX"> tags placed in the appropriate
>>> places in the document. (A no-GO button drop box is preferred.)
>>> How do I achieve this?
>> Try this...
>> In <head>:
>><script type="text/javascript">
>> function formHandler(form){
>> var URL =
>> document.form.site.options[document.form.site.selectedIndex].value;
>> window.location.href = URL;
>> }
>> In <body>:
> <snip>
>> I can confirm that it works properly in all major modern browsers.
> For users with javascript enabled.  One should always provide another
> means of navigation for users without, eg. Google.

Places where I embed such code have an alternative version that is
JavaScript-free. The OP can include another version which has a simple
expanded menu rather than a drop-down, but it's a poor choice from an
SEO-centric point-of-view.


Roy S. Schestowitz

[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index