You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Brian McSweeney <br...@aurium.net> on 2003/07/22 12:45:05 UTC

Dependent select boxes

Hi all,
 
I have an application that uses dependent select boxes, 
ie, by picking one item in a select box, then the contents 
of the next one will be decided.
 
This is used as a way to navigate a tree structure. I know 
that this is a common way of representing this structure 
type.
 
The problem is: currently for every onChange in the select
box, I go back to the server to populate the contents of the 
next select box. 
 
Now I know this is bad. I have the entire tree in memory, but 
I'm really weak on javascript. I want to move to a javascript 
solution where I populate javascript arrays and the whole tree 
can be navigated without going back to the server.
 
Can someone please give me a hand/advice? 
 
First off, how do I populate javascript variables from bean variables.
 
Thanks,
Brian 

RE: Dependent select boxes

Posted by Brian McSweeney <br...@aurium.net>.
Thanks Firat,

I'll take a look at this,

Cheers,
Brian

-----Original Message-----
From: Firat TIRYAKI [mailto:firat@pleksus.com.tr] 
Sent: 22 July 2003 12:04
To: Struts Users Mailing List
Subject: Re: Dependent select boxes

Take a look at the jguru faq for dynamic select box. You should generate
javascript arrays dynamically and use them in the functions, I hope it
will
be helpful

http://www.jguru.com/faq/view.jsp?EID=923880





----- Original Message -----
From: "Brian McSweeney" <br...@aurium.net>
To: <st...@jakarta.apache.org>
Sent: Tuesday, July 22, 2003 1:45 PM
Subject: Dependent select boxes


> Hi all,
>
> I have an application that uses dependent select boxes,
> ie, by picking one item in a select box, then the contents
> of the next one will be decided.
>
> This is used as a way to navigate a tree structure. I know
> that this is a common way of representing this structure
> type.
>
> The problem is: currently for every onChange in the select
> box, I go back to the server to populate the contents of the
> next select box.
>
> Now I know this is bad. I have the entire tree in memory, but
> I'm really weak on javascript. I want to move to a javascript
> solution where I populate javascript arrays and the whole tree
> can be navigated without going back to the server.
>
> Can someone please give me a hand/advice?
>
> First off, how do I populate javascript variables from bean variables.
>
> Thanks,
> Brian
>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Dependent select boxes

Posted by Firat TIRYAKI <fi...@pleksus.com.tr>.
Take a look at the jguru faq for dynamic select box. You should generate
javascript arrays dynamically and use them in the functions, I hope it will
be helpful

http://www.jguru.com/faq/view.jsp?EID=923880





----- Original Message -----
From: "Brian McSweeney" <br...@aurium.net>
To: <st...@jakarta.apache.org>
Sent: Tuesday, July 22, 2003 1:45 PM
Subject: Dependent select boxes


> Hi all,
>
> I have an application that uses dependent select boxes,
> ie, by picking one item in a select box, then the contents
> of the next one will be decided.
>
> This is used as a way to navigate a tree structure. I know
> that this is a common way of representing this structure
> type.
>
> The problem is: currently for every onChange in the select
> box, I go back to the server to populate the contents of the
> next select box.
>
> Now I know this is bad. I have the entire tree in memory, but
> I'm really weak on javascript. I want to move to a javascript
> solution where I populate javascript arrays and the whole tree
> can be navigated without going back to the server.
>
> Can someone please give me a hand/advice?
>
> First off, how do I populate javascript variables from bean variables.
>
> Thanks,
> Brian
>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org