• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

more once how can we submit JSP values to Action

 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ???>
 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much.

What about my 2nd problem

have any gud solution
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Politics is a circus designed to distract you from what is really going on. So is this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic