Login Register

Dojo use for Newbie...

I to All,
I am newbie in Dojo world...( In the past I have used Prototype + ScriptAcoulus..etc..)
And I have some problem for starting with this framework because the documentation (I have read in totally the dojobook) is poor...

I Would realize for my webpage a search module based on 3 ...

1) The first Select is a simple list of element
(For example :

chiave 1
chiave 2
chiave 3
)

a) If I apply whe dojit combobox for render my select with a good GUI...When the dojo render the tag SELECT ..lose the value of (key1,key2,key3)..It's Normal?

b) After the user choose the first select ..I would to "show" the second SELECT...and the value of this
second select is conditional by first select...How I can realize this with dojo?

(For Example :
if the user choose in the first SELECT the "key1" then Dojo must show the second SELECT with some value

word 1
word 2
word 3

if the user choose in the first SELECT the "key2" then Dojo must show the second SELECT with some value

pippo
pluto
silvestro

anb so...
)

2) When the User choose a value from the Second Select ...Dojo show the 3° SELECT that call a page in AJAX
with a Parameter and this Page return a JSON ... So that the content of this 3° SELECT is a result of a particullary key of JSON...

Then...Someone can Help me to translate or understand in Dojo language a solution form my simple problem?
(In prototype+script acoulus I have realized this code...)

Tnx for All

I must interject...

The comment about the documentation being poor is flat wrong. One might have gotten away with that comment 6 months ago, but not anymore. :)

Also, you would be hard pressed to call what you are requesting a simple problem :) However, Dojo provides a simple solution to your complicated problem.

I think the simplest solution would be to use the example of the dojo.Data-Enabled ComboBox and define multiple stores for your dynamic second and third select box options. Then have the onChange of the first select box call a function to set the second ComboBox's store appropriately, and again for the second to third.

It might help you to get better grasp on the documentation if you look through the tests for examples.

http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/