Click to See Complete Forum and Search --> : Moving Data from Server to Client


Mark Taylor
09-18-2000, 03:05 PM
Hi,
I'm creating a page that has several list boxes, let's call these A1, A2,
A3...A9. Depending on what is selected in A1, a list of items appears in
list box B1, A2 corresponds to B2 etc. I'll refer to the B list boxes as
Bx from here forward I don't want to have to go back to the server to retrieve
the item list for each Bx list box everytime a selection is made in it's
corresponding Ax list box because there are nine different A list boxes that
the user will select from when they use the page, that would get frustrating.
Here's a simple example using one of the nine list boxes, well call it Musical
Preferences:

ListBox A (Musical Preferences):
Jazz
Country
Alternative
HipHop

If I select Jazz in list box A I want ListBox B to display:

List Box B (Artists)
Miles Davis
John Coltrane
Charles Mingus
Thelonius Monk
Duke Ellington
etc

If I select Alternative in List Box A I want ListBox B to display:

List Box B (artists)
The Cure
Simple Minds
Depeche Mode
The Smiths
etc

Get the idea?

The only way I can think of to handle this is to set up some hidden text
areas so that the "lists" that will be placed in a B list box can be retrieved
via javascript when the user selects an item in an A list box. In the old
school, we would call this a kludge solution. Is there a better way?

Many Thanks

Mark

Sarosh Sepai
09-20-2000, 10:57 AM
You can use WDDX to send the data as WDDX packets to the client side and populate
the list box (using Javascript) depending on the selection in A1.


"Mark Taylor" <mtaylor1@cbsinc.com> wrote:
>
>Hi,
>I'm creating a page that has several list boxes, let's call these A1, A2,
>A3...A9. Depending on what is selected in A1, a list of items appears in
>list box B1, A2 corresponds to B2 etc. I'll refer to the B list boxes as
>Bx from here forward I don't want to have to go back to the server to retrieve
>the item list for each Bx list box everytime a selection is made in it's
>corresponding Ax list box because there are nine different A list boxes
that
>the user will select from when they use the page, that would get frustrating.
> Here's a simple example using one of the nine list boxes, well call it
Musical
>Preferences:
>
>ListBox A (Musical Preferences):
>Jazz
>Country
>Alternative
>HipHop
>
>If I select Jazz in list box A I want ListBox B to display:
>
>List Box B (Artists)
>Miles Davis
>John Coltrane
>Charles Mingus
>Thelonius Monk
>Duke Ellington
>etc
>
>If I select Alternative in List Box A I want ListBox B to display:
>
>List Box B (artists)
>The Cure
>Simple Minds
>Depeche Mode
>The Smiths
>etc
>
>Get the idea?
>
>The only way I can think of to handle this is to set up some hidden text
>areas so that the "lists" that will be placed in a B list box can be retrieved
>via javascript when the user selects an item in an A list box. In the old
>school, we would call this a kludge solution. Is there a better way?
>
>Many Thanks
>
>Mark
>

Colo
10-08-2000, 10:42 PM
What is WDDX?
How to use WDDX?
Can you give a sample?
Many Thanks.



"Sarosh Sepai" <sarosh@hotmail.com> wrote:
>
>You can use WDDX to send the data as WDDX packets to the client side and
populate
>the list box (using Javascript) depending on the selection in A1.
>
>
>"Mark Taylor" <mtaylor1@cbsinc.com> wrote:
>>
>>Hi,
>>I'm creating a page that has several list boxes, let's call these A1, A2,
>>A3...A9. Depending on what is selected in A1, a list of items appears
in
>>list box B1, A2 corresponds to B2 etc. I'll refer to the B list boxes as
>>Bx from here forward I don't want to have to go back to the server to retrieve
>>the item list for each Bx list box everytime a selection is made in it's
>>corresponding Ax list box because there are nine different A list boxes
>that
>>the user will select from when they use the page, that would get frustrating.
>> Here's a simple example using one of the nine list boxes, well call it
>Musical
>>Preferences:
>>
>>ListBox A (Musical Preferences):
>>Jazz
>>Country
>>Alternative
>>HipHop
>>
>>If I select Jazz in list box A I want ListBox B to display:
>>
>>List Box B (Artists)
>>Miles Davis
>>John Coltrane
>>Charles Mingus
>>Thelonius Monk
>>Duke Ellington
>>etc
>>
>>If I select Alternative in List Box A I want ListBox B to display:
>>
>>List Box B (artists)
>>The Cure
>>Simple Minds
>>Depeche Mode
>>The Smiths
>>etc
>>
>>Get the idea?
>>
>>The only way I can think of to handle this is to set up some hidden text
>>areas so that the "lists" that will be placed in a B list box can be retrieved
>>via javascript when the user selects an item in an A list box. In the
old
>>school, we would call this a kludge solution. Is there a better way?
>>
>>Many Thanks
>>
>>Mark
>>
>