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;
>> }
>></script>
>>
>> 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
--
Roy S. Schestowitz
http://Schestowitz.com
|
|