Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > dropdown box

Reply
Thread Tools

dropdown box

 
 
rockocubs
Guest
Posts: n/a
 
      04-22-2005
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>

 
Reply With Quote
 
 
 
 
Trance
Guest
Posts: n/a
 
      04-22-2005
rockocubs wrote:
> 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.
 
Reply With Quote
 
 
 
 
Toby Inkster
Guest
Posts: n/a
 
      04-24-2005
Trance wrote:

> 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.

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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
div box questions; float text around a box, fit box to image size Gnarlodious HTML 4 05-05-2010 11:30 AM
1 Gridview. Dropdown A is column from database, Dropdown B is column from database, Data in A and B must be from same row. anonymoushamster@gmail.com ASP .Net 2 11-07-2007 12:40 PM
ajax cascading dropdown: second dropdown disabled acadam ASP .Net 0 12-27-2006 10:59 AM
bind a dropdown in a column in a datagrid based on the dropdown value selected in another column of the datagrid. vishnu ASP .Net 1 03-25-2006 01:24 PM
Select dropdown box bleeds into Javascript dropdown menu Mike HTML 1 12-18-2003 09:49 PM



Advertisments