question on drop down box (can this be done)

DukeJustice

New member
Hi.

I have a question regarding dowpdown boxes.

Is it possible, with Dadabik, to have two drop down boxes that have information in them such as:

1st box, name of machines
2nd box, name of parts of machines

But parts of machine are not to be found on all machines, so that the 2nd box would have to relate to the first in order to present choices.

Ex.:
box 1, values:
press
binder
stapler

box 2, values:
for press in box 1:
feeder
units
dryer
for binder in box 1:
filer
feeder
blades
for stapler in box 1:
track
transmission


If it is not possible, are there workaround with actual release of Dadabik?

Please help.

Regards

DukeJustice



Post Edited (11-17-05 23:37)
 

DebbieS

DaDaBIK Guru
I do know this is something quite commonly done using javascript since it is happening at the user end based on user input. I don't know how this could be incorporated into the DaDaBIK program which is written to accomodate whatever fields/tables/databases it is looking at and not addressing specifically customized individual fields. Eugenio could answer this better than I and also there have been some posts in the Support Forum about this type of thing. Have a look through the Support posts.

 

alpha2zee

Well-known member
There was a similar post sometime ago. There were MySQL tables of countries, states, cities, etc., and in a similar chained-dropdown setup, selecting a country would show only states of that country in a second dropdown menu.

This is difficult because of the requirement for a second (and more) MySQL query which would require page reload. But perhaps it is doable with stored procedures in MySQL 5 or with XMLhttprequests (as in AJAX).



Post Edited (11-20-05 02:39)
 

DukeJustice

New member
We can now use stored procs into mysql (5 over see http://dev.mysql.com/doc/refman/5.0/en/stored-procedures.html).

I know I can mod my own copy of dadabik, but I'd rather give everyone something instead of beying my selfish self...

If Eugenio prefers not to rely on external software to run dadabik or is not willing to loose database interconnectivity (not all databases have stored procs yet) then stored procs are out... I would rather concentrate on what I talked with alpha2zee regarding http://www.dadabik.org/forum/read.php?f=2&i=520&t=520

Cause, the way I see it, Dadabik would require extensive modding to make these conditional values in drop down boxes. I have worked this issue around training users to use the system differently instead... For now at least.

But I would like to see this happen, if I can help.

Regards

Duke



Post Edited (11-20-05 02:43)
 

eugenio

Administrator
Staff member
DukeJustice wrote:

> Hi.
>
> I have a question regarding dowpdown boxes.
>
> Is it possible, with Dadabik, to have two drop down boxes
> that have information in them such as:
>
> 1st box, name of machines
> 2nd box, name of parts of machines
>
> But parts of machine are not to be found on all machines, so
> that the 2nd box would have to relate to the first in order to
> present choices.

[....]

Hi,
this is not simple to implement in DaDaBIK and it's not in my road map but now that DaDaBIK has subversion support is easier to contribute to the code, so if you have a proposal on how to accomplish the behaviour you have described we can discuss it.

Bye,

 
Top