• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Two dropdowns - need to indicate to server side code the specific dropdown

 
pendse anagha
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ,
I have two dropdowns in my JSP page
The problem is - I need to pass an indicator as to which dropdown has been changed

Both the dropdowns are in the same form
I would like to know - if its possible to pass an indicator through Javascript
that can be picked up in Java code

Thanks in advance ,
anagha
[ May 16, 2005: Message edited by: pendse anagha ]
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are mixing up a lot of technologies here. In an HTML form, each SELECT input should have a unique name so you could simply compare the returned value with the value originally set as SELECTED.
Whether the HTML gets written by JSP or is a static page has nothing to do with it.
If you want JavaScript to watch form activities and make some report, you can do that with one or more hidden variables in the form. Hidden variables in forms appear as request parameters just like SELECT input variable.
Bill
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This question would probably do better in the HTML/Javascript forum but here's one way:


You'll probably need to tweak it a bit to get it to work on older browsers.
[ May 16, 2005: Message edited by: Ben Souther ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic