Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
How to make one select choice effect another
System
I have two select boxes on my DCT, both of which return a list of items from the DB via an inlinecallout script.
When the user selects an item in the first select box I would like that to determine what is read from the DB into the second select box.
I've tried using FormAPI and that works fine as far as detecting the user's selection in the first box and then calling a function. But I need this function to set the value of the second box to a new inlinecallout function with different parameters so that I can get a different list back.
Any Ideas anyone ?
Thanks
/nick
Find more posts tagged with
Comments
james1
Rather than using FormAPI to change the inline callout on the second field, you should use FormAPI to perform the same work as the callout, and change/update the fields of the second field.
-- James
--
James H Koh
Interwoven Engineering
connector.jpg
Migrateduser
Thanks, But how do I use FormAPI to do a query to a DB ?
citi.dcpackage
citidsi.txt
citi(37).txt
Migrateduser
I had the same problem and ended up loading everything to the second select box and then filtering it using a javascript function + FormAPI.
Paulo Gouveia
Royal Caribbean and Celebrity Cruises
Information Tecnology
Migrateduser
look at the userscript/location example that comes with templating. Basically what I would suggest you do is replace the cgi that just returns static results with a cgi that makes a database call.
You might be able to speed up performance by having the cgi cache its results somewhere (maybe just a text/xml file on the server) rather than having it hit the db every time someone changes the select list.
Migrateduser
Thanks Paulo.
I tried this and it worked.
/Nick
mogoo
OK, this was very helpful, I've got this working (maintaining 2 select lists)... has anyone tried working with 3 select lists? In other words, SelectionA choice changes SelectionB options, which in turn changes SelectionC options. Any suggestions out there?
thanks,
maureen
msa02
Hi Nick, can u help me with the solution. I have exactly the same requirments.
Thanks!
Shams
msa02
can you guys help me with the code snippet. I have the same requirements for a current project.
thanks!