Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > How to Handle Variable Number of Items with <select>

Reply
Thread Tools

How to Handle Variable Number of Items with <select>

 
 
Peter Lauren
Guest
Posts: n/a
 
      05-01-2011
I can make a drop down select list thus.

<select>
<option value="lion">Lion</option>
<option value="tiger">Tiger</option>
<option value="cheetah">Cheetah</option>
<option value="leopard">Leopard</option>
</select>

However it is fixed at 4 specific items. How would I modify the
select block that that I could handle and number of items, with any
number of different names such as from a database.

Many thanks in advance for any help,
Peter.
 
Reply With Quote
 
 
 
 
Peter Lauren
Guest
Posts: n/a
 
      05-15-2011
On May 1, 10:11*pm, wayne <(E-Mail Removed)> wrote:
> On 05/01/2011 06:29 PM, Peter Lauren wrote:
>
> > I can make a drop down select list thus.

>
> > <select>
> > <option value="lion">Lion</option>
> > <option value="tiger">Tiger</option>
> > <option value="cheetah">Cheetah</option>
> > <option value="leopard">Leopard</option>
> > </select>

>
> > However it is fixed at 4 specific items. *How would I modify the
> > select block that that I could handle and number of items, with any
> > number of different names such as from a database.

>
> > Many thanks in advance for any help,
> > Peter.

>
> I believe you can add as many <option> tags as you need.http://htmlhelp.com/reference/html40/forms/select.html
>
> If you want to populate from a database:http://www.kirupa.com/forum/showthread.php?t=287765
>
> --
> Wayne
> One of the great tragedies of mankind is that morality has been hijacked
> by religion. Arthur C. Clarke


Thanks very much for your help. I used the database approach and it
works great! Sorry about my tardy reply. I was held up with the
issue of uploading multiple files. I have now resolved that issue.

Thanks again,
Peter.
 
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
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
selecting a variable number of individual items Joe Pizzanley Ruby 3 09-02-2010 08:12 PM
How to handle variable number of arguments? Lambda C++ 2 07-03-2008 01:28 PM
Possible to handle web requests without an ASPX page? i.e. have DLL handle request. jdlwright@shaw.ca ASP .Net 2 05-31-2005 05:42 PM
File Handle Reading Blues: Rereading a File Handle for Input Dietrich Perl 1 07-22-2004 10:02 AM



Advertisments