Re: Dropdown Box (for DALLASSTA)

by Thomas James Allen <tjallen(at)pipeline.com>

 Date:  Tue, 05 Oct 1999 19:01:14 -0400
 To:  DALLASSTA(at)aol.com
 Cc:  hwg-basics(at)hwg.org
  todo: View Thread, Original
At 08:40 AM 10/5/99 EDT, you wrote:
<snip>
>I would like to try yours also, but is there a limit as to the number of 
>links you can use on it, and also you said that it will automatically add the 
>.html.  my links are htm.  Can it be done??????? I am totally frustrated with 
>this!  Lisa
>---------------------
Lisa,
The "drop down list & go" javascript that I sent earlier, repeated below,
can easily be modified to do what you are asking.

First, your htm instead of html:
See the line in the script:
    location.replace(s + ".html");
remove the "l" of ".html"

Second, you can place as many options in the select list as you wish,
see the section:

<option value="url-01">First Location
<option value="url-02"> Second Location
<option value="url-03"> Third Location

just add more options, or rewrite these.

Suppose you want the drop down list to display "My Awards"
and you want it to go to "awards.htm"  You would write:
<option value="awards">My Awards

Below is the script again. Note the script section goes between
your "head" commands, the form part goes in the "body" section.
I have included the head and body commands to show you this.

Write back if you have more trouble.
jimmy
-----------
<head>

<script language="JavaScript">
<!-- hide the js
function goThere(){
var n=document.fred.joe.selectedIndex;
var s=document.fred.joe.options[n].value;
location.replace(s + ".html");
}
// stop hiding-->
</script>

</head>

<body>

<form name="fred">
<select name="joe">
<option value="url-01">First Location
<option value="url-02"> Second Location
<option value="url-03"> Third Location
</select>
<input type="button" value="Go" onclick="goThere();">
</form>

</body>
-------------------
---
Jimmy Allen (Thomas James Allen)
Business - Get Your Website Here
http://www.getyourwebsitehere.com
Personal - Eclecticity
http://www.getyourwebsitehere.com/personal

HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA