Several ways:
One is a 2 dimensional array put is scope by Struts, for JavaScript use.

And a cool way:
XML-RPC via JavaScript.
Cheat Sheet page on baseBeans.com has a link on specific example, or you can google on XML-RPC. (I realy think Scripting and XML-Type-Services is going to be big!!!!)


.V

[EMAIL PROTECTED] wrote:

Thanks,

But, Right now I am using the following way with javascript,

   eg. First drop down,
            <html:select property="system" style="width:150px" onchange="return call(this)" 
styleId='sys1' styleClass="text">
               <html:options collection="systemids1" property="value" 
labelProperty="label"/>
                        </html:select>

Second drop-down,
<html:select property="subsystem" style="width:150px;display:'none'" onchange="pops(this)" styleId='subsys1' styleClass="text"> <html:options collection="subsystemids1" property="value" labelProperty="label"/> </html:select>


<html:select property="subsystem" style="width:150px;display:'none'" onchange="pops(this)" styleId='subsys2' styleClass="text"> <html:options collection="subsystemids2" property="value" labelProperty="label"/> </html:select>

Depends on first drop-down selection i am hiding subsystem1 or subsystem2. If suppose the first drop-down has lengthy list then my logic needs more drop-downs. It increase the code side and maintenance..Is there any way to do that?..

Thanks,
Kaja

-----Original Message-----
From: Ruth, Brice [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 28, 2003 4:19 PM
To: Struts Users Mailing List
Subject: Re: dynamic drop-down changes without calling action class
using session


You'll have to do more than store the data for your drop-down in the session, if you don't want another request to go to the server - you'll have to store all the data for your drop-downs in JavaScript and use JavaScript to dynamically populate the drop-downs as selections change.


[EMAIL PROTECTED] wrote:


Hi,
 I am having trouble when I try to use struts and Javascript together. =
I am using 4 dropdown list. Based on one selection dynamically change =
other drop- down list. Eventhough I am bringing all drop-list from DB at =
one time and stored in session. I would like to know how to synchronize =
without calling action class again.=20

In advance I appreciate your help..

Thanks,
Kaja



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-- Victor Cekvenich, Struts Instructor (215) 321-9146

Advanced Struts Training
<http://basebeans.com/do/cmsPg?content=TRAINING> Server Side Java
training with Rich UI, mentoring, designs, samples and project recovery
in North East.
Simple best practice basic Portal, a Struts CMS, Membership, Forums,
Shopping and Credit processing, <http://basicportal.com> software, ready
to develop/customize; requires a db to run.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to