File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

more once how can we submit JSP values to Action

 
sudhakar ananth
Ranch Hand
Posts: 68
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends

1ST PROBLEM:

i have a dropdown list "Countries" if i select any of one then the next dropdown list should get values " States" and then when i select one of the 'state' then next dropdown list should get the values of "Cities" in it.


hope you all understood my problem

Country : "DROPDOWN LIST"
state : "STATES"
cities : "CITIES"

so what i did is
<html:select parameter="country" onChange="javascript to submit the form">
is this correct method
and similary when i submit this values i should get the next dropdown list populate with STATES values


So thing is how can i do it pls

i need the javascript code and as well as explanation

............................................................................

2ND PROBLEM:

Also i need to can we get values from "VALUEBEANS" which is set in arraylist like

let the valuebean has variable 'country' and i got values into this variable
in while(rs.next())
{
..
.....
and added to the arraylist arraylist.add(thebeanname);
}
then in ACTIONCLASS i am doing this

request.setAttribute("alist",arraylist);

So question lies in
where i have to keep what in
<html:select parameter"???"
<html ptionCollection parameter="???" or ???>
 
Kaustabh Singha Roy
Ranch Hand
Posts: 43
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The first problem you mentioned is the typical case for which the "Ajax" technology is used. With this technology you can send requests to server, get the response data, and show the result in the web page. But without refreshing the page. This no doubt is done with javascript. The code for this is not going to be very trivial. I suggest you to Google for "Rico Ajax", that is easy to use. Try that and I hope you will get success.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This problem is generally referred to as "dependent dropdowns" or "dependent selects" . It has been discussed recently in this forum in this thread. You can also get a lot more information on it on the web by Googling one of the above topics.
 
sudhakar ananth
Ranch Hand
Posts: 68
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much.

What about my 2nd problem

have any gud solution
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sudhakar,

I'm afraid I can't make any sense of what you are trying to say in your second problem. I would need to have you state the problem more clearly in order to help you with it.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic