Jump to content

Frontpage


shao_khan
 Share

Recommended Posts

By "drop down box" do you mean "pull down menu"?

If so try this example:

<select NAME="SportImport" ONCHANGE="GoUrl(this)">

<option value selected>Choose Page

<option value>--------------

<option value="http://www.sportimport.co.uk">Home Page

<option value="http://www.sportimport.co.uk/importing.htm">Importing Audi

<option value="http://www.sportimport.co.uk/s3.htm">Audi S3

<option value="http://www.sportimport.co.uk/ttc.htm">Audi TT Coupe

<option value="http://www.sportimport.co.uk/ttr.htm">Audi TT Roadster

<option value="http://www.sportimport.co.uk/a4.htm">Audi A4

</select>

Link to comment
Share on other sites

Colin forgot to give you the bit of JavaScript which makes it work..

<script type="text/javascript" language="JavaScript">

function GoURL(url)

{

// Put a // in front of this if it doesn't work

this.location.href = url;

// If that don't work, remove the // and try:

// this.location.replace(url);

}

</script>

I didn't test that, but

Link to comment
Share on other sites

In the header of your document:

<script type="text/javascript" language="JavaScript">

function GoUrl(mylist)

{

this.location.replace(mylist.value);

}

</script>

Then, in the body

<select name="gotolist" onchange="GoUrl(gotolist);">

<option value="http://uk.yahoo.com" SELECTED>Yahoo! UK</option>

<option value="http://www.tyresmoke.net">TyreSmoke</option>

<option value="http://www.audi-sport.net>Audi-Sport.net</option>

</select>

Think that should do it, although I haven't tested it.

Trev

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...