Go Back   Trackpads Community > General Discussions > Computer and Technology > Web Design

Web Design Forums and discussions on webdesign

Web Design

Reply
 
LinkBack Thread Tools
Old 10-25-2004, 08:00   #1 (permalink)
abc
Civilians

 
Default example code for dynamically generated drop down boxes?

hi all,
can someone guide me on how to do the following?

i will have a drop down box, with the entries 'Manchester, London,
Birmingham' etc.

When you choose Manchester, it may depending on sub entries, pop up another
drop down box with sub entries such as 'Man Utd., Man City' etc. If there
are no sub entries, no new drop down is shown.

This can lead to another drop down... E.g. London --> North --> Tottenham
Hotspur

etc.

When submit is clicked, this entry is added to a MySQL database,

any ideas?
thanks


 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Trackpads Information
Click to Visit
Old 10-25-2004, 08:00   #2 (permalink)
Gregory Toomey
Civilians

 
Default Re: example code for dynamically generated drop down boxes?

abc wrote:

> hi all,
> can someone guide me on how to do the following?
>
> i will have a drop down box, with the entries 'Manchester, London,
> Birmingham' etc.
>
> When you choose Manchester, it may depending on sub entries, pop up
> another drop down box with sub entries such as 'Man Utd., Man City' etc.
> If there are no sub entries, no new drop down is shown.
>
> This can lead to another drop down... E.g. London --> North --> Tottenham
> Hotspur
>
> etc.
>
> When submit is clicked, this entry is added to a MySQL database,
>
> any ideas?
> thanks


You are asking for somebody to do programming for you. Hire somebody if you
cant do it yourself.


To give you some idea, I generate the "year" dropdown box in
http://www.ipo-australia/scgi-bin/be...eport=advanced
using Perl & mysql, as follows:

sub select_year {
my $all = @{getrec('select count(*) kount from ipo where
visible="Y"')}->[0]->{kount};
print<<EOF;
<table>
<tr><td class=small><b> Year - multiple selection</b></td></tr>
<tr><td>
<SELECT size="10" name="year" multiple>
@{[option('year','all',"All ($all)")]}
EOF
print option('year',"$_->{year_kount}","$_->{year_kount}
($_->{kount})") for @{getrec('select year(ipo_dt) year_kount, count(*)
kount from ipo where visible="Y" and ipo_dt>19900101 group by
year(ipo_dt)')};
print<<EOF;
</SELECT>
</tr></td></table>
EOF
}


gtoomey
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

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 On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using an IF/THEN from across 2 drop down (combo) boxes??? Jim Sharky Microsoft Applications 1 10-03-2005 14:00
Problem with FrontPage generated code when publishing to website Bob Evans Web Design 0 02-02-2005 00:00
Dynamically changing the input range of a Drop Down DoctorV Microsoft Applications 1 11-16-2004 14:00
Drop down boxes help timrand Microsoft Applications 1 10-28-2004 12:00
Worksheet drop boxes iluminatae Microsoft Applications 2 08-04-2004 02:47


Community Information
Options
Quick Options
Trackpads Non-Commercial Ad
Copyright Information Click to Visit
Time
Server Time
All times are GMT -4. The time now is 04:14.
Copyright
Copyright Information
The header is based off of work by Vipixel.com and modified by this site. Trackpads and the Trackpads Logo are both Registered Trademarks of Jason Edwards and cannot be used without prior written permission.  The only exception is as a link back to this site. Trackpads is a private website run by a small legion of volunteers, 3 dogs, 12.5 cats and an army of small, super smart, bio-engineered mice with pointy hats and tutu's. Search Engine Friendly URLs by vBSEO 3.2.0 RC7
Archive Links
Archive Links
Page generated in 0.71001 seconds with 19 queries