wood burning stoves 2.0*
The moose likes Struts and the fly likes html select question..please help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html select question..please help" Watch "html select question..please help" New topic
Author

html select question..please help

lee anthony
Ranch Hand

Joined: Jan 23, 2004
Posts: 35
i need to referesh the same page onchange of html select
<html:select property="id" onchange=""> //onchange what should i do
<html ptions collection="colroles" labelProperty="name"
property="id"/>
</html:select>
//onchange what should i do
i tried to put some javascript but did not work
any help......
code piece will be helpful
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

Isn't your page fresh enough?
Refreshing the page just gives you what was already there... are you trying to CHANGE something else on the page??? [Mmmm... dreaming of how good JSF will be for this... ]
You might need to have your script submit the form to accomplish what you need. What needs to be refreshed (changed) on your page?


A good workman is known by his tools.
lee anthony
Ranch Hand

Joined: Jan 23, 2004
Posts: 35
Hi my intension was to refesh the same page..so that that list value are picked up from diff tables... according to the value selected ...from html:select
any heklp
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

So there is a list on your page that needs to change when an option is selected... right?
There's a couple options that I can think of and both involve Javascript:
Option 1: Have the lists stored as Javascript variables.
Option 2: Have Javascript submit the page in such a way that the action adds the list to the form and forwards back to the page again.
(Option 3: JSF, but it's a lot to learn)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: html select question..please help