dropdown box

R

rockocubs

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.

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

<BODY>
<br>
Select Table to view:
<SELECT NAME=maxfiles>
<OPTION selected>WEA3BAS
<OPTION>WEA2BAS
<OPTION>WEA1BAS
</SELECT>
</BODY>
</HTML>
 
T

Trance

rockocubs said:
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.

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

<BODY>
<br>
Select Table to view:
<SELECT NAME=maxfiles>
<OPTION selected>WEA3BAS
<OPTION>WEA2BAS
<OPTION>WEA1BAS
</SELECT>
</BODY>
</HTML>

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 :)

Trance.
 
T

Toby Inkster

Trance said:
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 :)

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>
<fieldset>
<legend>Choice of Table</legend>
<label>
Table
<select name=maxfiles>
<option selected>WEA3BAS
<option>WEA2BAS
<option>WEA1BAS
</select>
</label><br>
<input type="submit" value="View">
</fieldset>
</form>
<? } ?>

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,190
Latest member
ClayE7480

Latest Threads

Top