• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Select the value from the Combo box

 
Ad Rajesh
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, i am selecting a value in the drop down.with respect to the selected value i have to reload the page or refresh the content of the page.
HJw can i do that?
Please help.
 
Soumik Basu
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use AJAX,Thats the best possible solution as you are trying to communicate between server and client without submitting or refreshing the page.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do a serach for double combo or linked selects. There should be plenty of examples with postbacks or with Ajax.

Eric
 
Amit Sharma
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rajesh,

Please do the following in the Select box html code call a javascript which takes the selected value from drop box and based on this Call the struts Action or what ever you are calling to refresh the Page.

eg

<select name="demo" onChange="refreshPage(this)">
<option value="1"> 1</option>
<option value="2"> 2</option>
</select>

Note this is just an idea that i am providing I dont have any live example to give you right now.

Regards
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64618
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, to avoid confusion, you should stop calling it a "combo box". A combo box is a type of UI control that is not available on the web. Call it a dropdown or a select.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic