Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

drop downs

 
Anil Verghese
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hii guyzz..

I 'v got two drop downs in my jsp page, when this page is loaded first loaded the first drop down must be populated and when the user selects something the second must be filled...

how can i do this using struts, i did it by adding my jdbc connection code in my jsp page itself is there a way to do it in a pure mvc2 way...
 
RoshaniG Gopal
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Anil,

You may use Ajax for the same. You will find plenty of examples for the same. It is one typical case for Ajax application.
 
Mattia Merenda
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Anil,
I had your same problems.
In this link there is a topic that I posted and it should help for your first problem.
The second link should help for the second drop down list.

http://www.coderanch.com/t/55333/Struts/html-select-html-options

http://www.coderanch.com/t/55440/Struts/Value-returned-select-tag
 
Mattia Merenda
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Anil,
I had your same problems.
In this link there is a topic that I posted and it should help for your first problem.
The second link should help for the second drop down list.

http://www.coderanch.com/t/55333/Struts/html-select-html-options

http://www.coderanch.com/t/55440/Struts/Value-returned-select-tag
 
Brent Sterling
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also see this current thread:
http://www.coderanch.com/t/55460/Struts/Shoud-window-location-replace-Struts

- Brent
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic