wood burning stoves 2.0*
The moose likes Struts and the fly likes new to struts - selected item from drop down list Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "new to struts - selected item from drop down list" Watch "new to struts - selected item from drop down list" New topic
Author

new to struts - selected item from drop down list

beth ana
Greenhorn

Joined: Jul 07, 2004
Posts: 11
Hi,
How do i find the selected value in a drop down list? based on the selected option I want to set a message from the properties file.

Any help is appreciated.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60774
    
  65

Moving to the Frameworks forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30085
    
149

Beth,
In your action, you can get the ActionForm. It's getXXX() method will tell you what the value is set to for the field before the JSP is loaded.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
beth ana
Greenhorn

Joined: Jul 07, 2004
Posts: 11
But, I have not yet submitted the form. I need to find the selected value onload and also onchange and display the coresponding description field in the same page.
Guiqiang Zhang
Greenhorn

Joined: Jan 10, 2004
Posts: 6
May you can use javascript.


I help you , You help me!!
 
Don't get me started about those stupid light bulbs.
 
subject: new to struts - selected item from drop down list
 
Similar Threads
coding help needed
DropDown List Problem : file system
Reg : Drop-down box
disabled field with selected value
saving preselected drop down value