This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes HTML, CSS and JavaScript and the fly likes JSP + Ajax Combo box onChange event Pass Multiple Values 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 » Engineering » HTML, CSS and JavaScript
Bookmark "JSP + Ajax Combo box onChange event Pass Multiple Values" Watch "JSP + Ajax Combo box onChange event Pass Multiple Values" New topic
Author

JSP + Ajax Combo box onChange event Pass Multiple Values

Sagar Dumbre
Greenhorn

Joined: Mar 02, 2012
Posts: 12
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

Joined: Jan 10, 2002
Posts: 61084
    
  66

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Sagar Dumbre
Greenhorn

Joined: Mar 02, 2012
Posts: 12
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

Joined: Jan 10, 2002
Posts: 61084
    
  66

"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

Joined: Mar 02, 2012
Posts: 12
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

Joined: Jan 10, 2002
Posts: 61084
    
  66

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

Joined: Mar 02, 2012
Posts: 12
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP + Ajax Combo box onChange event Pass Multiple Values