Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes Struts and the fly likes Dependent drop down boxes with javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Dependent drop down boxes with javascript" Watch "Dependent drop down boxes with javascript" New topic
Author

Dependent drop down boxes with javascript

Pooja Shah
Greenhorn

Joined: Jan 05, 2009
Posts: 13
I am new to Struts. I need to implement dependent drop down boxes.
I do not want to use Ajax, and hence have decided to get this done using Javascript.
I want to know if in my Javascript function, i can specify the method of the action to be called.
If not, then how do I differentiate between the submit from Javascript(when the 2nd drop box is to be populated), and the form submit(when, based on the 2 selected values of the drop down boxes, a file will be downloaded).
Any suggestions will be appreciated!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 62307
    
  68

Pooja Shah wrote:I do not want to use Ajax, and hence have decided to get this done using Javascript.


Ummm, Ajax is JavaScript. What did you think it was?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Mohan rvscas
Ranch Hand

Joined: Jul 03, 2010
Posts: 39
you can use DOJO Concept in struts.
Pooja Shah
Greenhorn

Joined: Jan 05, 2009
Posts: 13
Thanks for the replies... I ultimately did this using the <s:doubleselect> tag.
 
Have you tried LearnNowOnline? http://www.learnnowonline.com/
 
subject: Dependent drop down boxes with javascript