• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

JSP + Ajax Combo box onChange event Pass Multiple Values

 
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:-
 
Marshal
Posts: 67299
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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
Marshal
Posts: 67299
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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
Marshal
Posts: 67299
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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
 
You can't have everything. Where would you put it?
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!