Database driven & dynamic dropdown menus

Hello. I need to have three dropdown menus on my site.  The content will be database driven (using SQL Server) and depending on the choice made on menu1, menu2 will dynamically change, and depending on the choice made on menu2, menu3 will change.  I'm not sure how to do this with ColdFusion. Any help would be appreciated.

Thanks in advance.
RSebastianiAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

proceptCommented:
Hi,

here's a little tutorial I wrote with two related selects. Can easily be expanded to make three selects. ;-))

http://www.procept.net/index.cfm?page=coldfusion/tutorials/dynSelect/index

Feel free to ask if you need help in adding one more select.

HTH,

Chris
0
anandkpCommented:
theres a tag for this CF_THREESELECTSRELATED !

this wld do it for u !
0
anandkpCommented:
go to http://www.geocities.com/thanny/ & scroll to bottom right of the page !

& u shld be able to download the tag & use it easily :)

HTH

K'Rgds
Anand
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

CFDevHeadCommented:
0
anandkpCommented:
One cld easily write a customised array function !

I did the same till i found the tags ... why create them when they can do it easily for u :)
0
proceptCommented:
Anand,

> why create them when they can do it easily for u :)

Because it's easier to learn and understand when you code it yourself. ;-))

Chris


0
anandkpCommented:
I believe there's no point in reinventing the wheel ... !
One shld just know how to use it - thats all ...

depends how u look at it ... cos of all the 10000.. tags available - if a person goes to write all of them by himself ... pheeeww ...

Cheers
Anand
0
RSebastianiAuthor Commented:
First of all, thanks everybody for your answers.  

I'm trying the CF_THREESELECTSRELATED tag first.  Anand, I went to the link you posted and downloaded a zip file. I changed all the options accordingly but when I try to run it , the error I get is that I didn't specify Attributes.Query, but I did.  I'm not sure where I'm supposed to place the tag code.  Right now I have everything in one page, the code from ThreeSelectsRelated.cfm, the query and the form.  What am I doing wrong?

Thanks!!!!!
0
RSebastianiAuthor Commented:
CFDevHead,

Ok, I'm using the script but I don't want it to redirect to another page. What lines do I need to remove? I'm trying but I keep getting errors.

Thanks!
0
CFDevHeadCommented:
take out this function
function redirect2(z){
window.location=temp1[z].value
}
0
RSebastianiAuthor Commented:
I did but when I make the selection on the third select box, I get the Object Expected error. Any ideas why? Thanks.
0
CFDevHeadCommented:
on the thrid select box get rid of the onChange="redirect2(this.options.selectedIndex)"
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RSebastianiAuthor Commented:
Duh. I feel stupid. Thanks!
0
RSebastianiAuthor Commented:
CFDevHead,

I have a new problem. When I submit my form to the database, the only data written into the database is select box #1.  select boxes #2 and #3 are blank.  Any ideas on how to fix this one?

Thanks.
0
anandkpCommented:
Just give urself some time in understanding how the tag works !

Read thru all teh files it has for reference & try it out ... it may look difficult at the first go ... but give it a try & it shld work out !
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.