File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

html select question..please help

 
lee anthony
Ranch Hand
Posts: 35
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4727
Mac Ruby VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
lee anthony
Ranch Hand
Posts: 35
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4727
Mac Ruby VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic