dropdown box

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
 i have a drop down box. When the user makes there selection, i want to
link to an tag on a web page. I know how to code the href but not sure how
to tie it two theselection process.

<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">

Select Table to view:
<SELECT NAME=maxfiles>
<OPTION selected>WEA3BAS

Re: dropdown box

rockocubs wrote:
Quoted text here. Click to load it

Do you mean a drop down menu? If so there is a nice little tutorial on
these at Lissa's site; http://www.lissaexplains.com/fun.shtml :)


Re: dropdown box

Trance wrote:

Quoted text here. Click to load it

That's a stupid menu that won't work without Javascript.

To answer the OP's question, assuming you have PHP on your server...

  $choice = $_GET['choice'];
  if ($choice=='WEA3BAS') {
<table><!-- data for WEA3BAS table --></table>
<? } elseif ($choice=='WEA2BAS') { ?>
<table><!-- data for WEA2BAS table --></table>
<? } elseif ($choice=='WEA1BAS') { ?>
<table><!-- data for WEA1BAS table --></table>
<? } else { ?>
<form action="<?=$_SERVER['PHP_SELF']?>" method=get>
    <legend>Choice of Table</legend>
      <select name=maxfiles>
        <option selected>WEA3BAS
    <input type="submit" value="View">
<? } ?>

It is not difficult to rewrite this in other languages (Perl, ASP, etc) if
need be.

Toby A Inkster BSc (Hons) ARCS
Contact Me  ~ http://tobyinkster.co.uk/contact

Site Timeline