[Zope] RE: Combo box

Nemeth Miklos nemeth@iqsoft.hu
Sat, 01 Jan 2000 13:35:54 +0100


> Hi all!
>
> Hi have another problem and I would to read your ideas!
>
> I have to dbtables:
>
> Categories and SubCategories (depending from Categories).
>
> I would like to let the user choose in a combo-box the category
> (this is
> simple) and then the sub-category in another combo-box containing
> only the
> subcategories of the selected category. With ASP I am used to
> download all
> the subcategories via an SQL at the page load and save the values in
> arrays. Then depending of the selected category load via Jscript the
> subcategories values dinamically.
>
> How can I do it in zope?
>
Exactly the same way you do it now. JScrips are completely client side
(ie browser side) facilities,
you can embedd anything (your browser can understand) in your HTML pages
generated by DTML.

>
> Do I have to use the same way using JScript?
>
Yes.

>
> Is there any other way not using the combo box?
>
If the number of items in your SubCategories table is too many (over
1000), you should create a JScript
function (let's call it RetrieveSubCategoriesForCategory) triggered when
an item in your Categories combo box is selected.
RetrieveSubCategoriesForCategory may send a HTTP, XML-RPC request to
your Zope server, the result set are to be shown in your
SubCategories combobox.
You may do this either in a Java Applet (perhaps even simpler).

>
> Thank you very much for your help but I need your help to use this
> wonderful environment as Zope is!
>
Zope is really wonderful!

NM