Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP + Ajax Combo box onChange event Pass Multiple Values

 
Sagar Dumbre
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP page Code:-



Now i want to get selected values of both the Drop Down List in showState function. i want to invoke same function as the ajax query will be processing on different page which requires both these parameter i.e Area & FType

Ajax JSP page:-
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64851
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Correct terminology is important, please read: HtmlHasNoComboBox

Also, please take the time to choose an appropriate forum for your posts. This forum is for questions on JSP, not JavaScript. For more information, please click this link ⇒ CarefullyChooseOneForum.

This post has been moved to a more appropriate forum.
 
Sagar Dumbre
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Correct terminology is important, please read: HtmlHasNoComboBox

Also, please take the time to choose an appropriate forum for your posts. This forum is for questions on JSP, not JavaScript. For more information, please click this link ⇒ CarefullyChooseOneForum.

This post has been moved to a more appropriate forum.


Ohh..Sorry it was Drop down list.
Please hemp me with the question
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64851
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"hemp me"?

In any case, I'm not quite sure what you are asking. If you want to know how to obtain the value of that other drop down, give it an id value and you can obtain its value with: document.getElementById('whatever').value
 
Sagar Dumbre
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:"hemp me"?

In any case, I'm not quite sure what you are asking. If you want to know how to obtain the value of that other drop down, give it an id value and you can obtain its value with: document.getElementById('whatever').value



In ajax jsp page i want to have values of two different drop down list. and ajax page will be called by only one function (Say. showState() ) which is declared at onChange event of both the drop down list
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64851
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sagar Dumbre wrote:
In ajax jsp page i want to have values of two different drop down list. and ajax page will be called by only one function (Say. showState() ) which is declared at onChange event of both the drop down list


There is no such thing as an "ajax jsp page". Remember JSP is a server-side technology. Once the page reaches the browser, it's just HTML.

So are you saying that you need to pass both values to an Ajax request? If so, what's the problem? I've already shown you how to obtain the value of any control on the page. Please be more specific on your questions.
 
Sagar Dumbre
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:
Sagar Dumbre wrote:
In ajax jsp page i want to have values of two different drop down list. and ajax page will be called by only one function (Say. showState() ) which is declared at onChange event of both the drop down list


There is no such thing as an "ajax jsp page". Remember JSP is a server-side technology. Once the page reaches the browser, it's just HTML.

So are you saying that you need to pass both values to an Ajax request? If so, what's the problem? I've already shown you how to obtain the value of any control on the page. Please be more specific on your questions.


if i selects value of one drop down and then another drop down.after that on which drop down function should be implemented to get both the values of drop down
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic