CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Dropdown list updates on the fly

Print topic Send  topic

Author Message
Doug
Posted: 03/24/2004, 12:53 PM

I am currently using the Eval version of CCS, using ColdFusion language. I need the ability to have 2 dropdown lists on one page with one being parent, one child. I have selected these from the HTML Toolbox in CCS. Both are bound to tables in an Access DB. The 1st DropDown list is bound to a table called Category which contains the elements CatName, ParentID. The 2nd DropDown list is bound to a table called SubCat and has elements SubCat, ParentID. Obviously I have related the Parent IDs within Access and created a parent/child relationship.

I have no problem populating either dropdown list when the form runs. But what I really need is for the 2nd drop down, Subcategories, to populate AFTER the Category is chosen in the first dropdown by the user in real-time. I need the 2nd dropdown to display only the CHILD records related to the Category selected above. Any tips on how to do this? Also, the 1st dropdown list, by default when the form loads, is showing the first category name as its value instead of SELECT VALUE. I have chosen the approprate option in the RIGHT-CLICK -> SELECT property from the DropDown. yet no luck. The Subcategory dropdown does show Select Value but I cannot get the first one to do that.

THANK YOU MUCH FOR ANY HELP!
Doug
DonB
Posted: 03/24/2004, 4:16 PM

This is what we call "dependent listboxes". There are examples on the
codecharge.com site, some in the example pack that ships with CCS, and I
have some info on my site:
http://www.gotodon.com/ccbth/examples/dependentlistbox.asp. I recall
another approach (nicer than mine). that was posted in here or the ASP forum
not too long ago. Possibly was from Don Safar but I don't remember for
sure. In essence, it opens a small popup window to fetch and reload the
"main" page - thus avoiding the screen re-paint that my example incurs.

The concepts will all translate easily to CF or other platforms since they
are primarily implemented as javascript-on-the-browser anyway.

--
DonB

http://www.gotodon.com/ccbth


"Doug" <Doug@forum.codecharge> wrote in message
news:24061f56557a70@news.codecharge.com...
> I am currently using the Eval version of CCS, using ColdFusion language.
I need the ability to have 2 dropdown lists on one page with one being
parent, one child. I have selected these from the HTML Toolbox in CCS.
Both are bound to tables in an Access DB. The 1st DropDown list is bound
to a table called Category which contains the elements CatName, ParentID.
The 2nd DropDown list is bound to a table called SubCat and has elements
SubCat, ParentID. Obviously I have related the Parent IDs within Access
and created a parent/child relationship.
>
> I have no problem populating either dropdown list when the form runs.
But what I really need is for the 2nd drop down, Subcategories, to populate
AFTER the Category is chosen in the first dropdown by the user in real-time.
I need the 2nd dropdown to display only the CHILD records related to the
Category selected above. Any tips on how to do this? Also, the 1st
dropdown list, by default when the form loads, is showing the first
category name as its value instead of SELECT VALUE. I have chosen the
approprate option in the RIGHT-CLICK -> SELECT property from the DropDown.
yet no luck. The Subcategory dropdown does show Select Value but I cannot
get the first one to do that.
>
> THANK YOU MUCH FOR ANY HELP!
> Doug
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

Doug
Posted: 03/24/2004, 10:43 PM

DonB,

Thank you for your reply. I went to the ASP forum and found this link regardinjg dependent lists...
http://www.atgconsulting.com/oodynlistbox.asp

Now THAT Is a slick implementation of dependent list boxes. But I do not think it would work on ColdFusion. I am getting a bit frustrated at the lack of "simple" implementations of some java apps within ColdFusion. perhaps I need to contemplate moving to ASP.

Thanks again
Ozum
Posted: 03/25/2004, 4:32 AM

A more generalized and simple solution
http://forums.codecharge.com/posts.php?post_id=43574
acapp


Posts: 31
Posted: 04/15/2004, 5:07 PM

I have looked at both Alexey's code and
the sample found at http://support.codecharge.com/kb_article.asp?article_id=61.

I find both lacking in robustness, specifically the sample article. Does anyone have any code that is in PHP and CCS that works??

Thanks
Andrew
View profile  Send private message
peterr


Posts: 5971
Posted: 04/15/2004, 5:39 PM

The robustness depends only on the approach that you take and on the amount of data that you deal with.
If you choose the method that submits the information to the server after the value of the first listbox was changed then with small amount of data naturally it cannot be as robust as a solution that does not submit anything to the server. But I think that it works. Did you experience any specific problems or errors? What were they?

On another hand, if you don't want to use server-based method but have too many possible values in the 2nd listbox that depend on the 1st listbox, then the browser will need to load a lot of data and such solution also cannot be robust.

Therefore the question is what you consider robust, what doesn't work for you, and what approach did you select.
Did you select the approach that requires the page refresh (not robust with small amount of data), or the approach that queries data from the server in the background (also not robust), or the approach that loads large amount of data into the browser so that the refresh is not needed (not robust with large amount of data).
I'm assuming that each solution can be more robust than other, depending on the amount of the data and possibly other factors.
Therefore please provide more details abot what do you expect.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
paporter
Posted: 04/19/2004, 3:31 AM

I don't use ColdFusion Doug but I did come across this tutorial and thought that it might help you.

http://www.evolt.org/article/Creating_Dynamic_Select_Boxes/17/1324/

Hope it is of some help.

Paul
jayaprakash
Posted: 06/11/2004, 7:33 AM

:-) hi guys,


Please any one help me how to dynamically dropdown the datas from database to dropdownlist box.

Please findout the solutions and let me know....

thanks and regards

jp
rrodgers
Posted: 06/13/2004, 6:35 AM

Quote jayaprakash:
:-) hi guys,


Please any one help me how to dynamically dropdown the datas from database to dropdownlist box.

Please findout the solutions and let me know....

thanks and regards

jp



Hi,
http://www.sylvancomputing.com/ccs/deplist/Default.asp

Here is an example using asp.

It is based on an example from this page
http://www.atgconsulting.com/gofetch.asp

Rob

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.