aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Submit contents of a listbox from jsp to a serlvet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Submit contents of a listbox from jsp to a serlvet" Watch "Submit contents of a listbox from jsp to a serlvet" New topic
Author

Submit contents of a listbox from jsp to a serlvet

Rajesh Khan
Ranch Hand

Joined: Oct 16, 2011
Posts: 230
Hi , I need to submit the contents of my list box from a javascript function on my jsp page to a servlet.
Why from a javascript function ? Because the user already clicked a button and a javascript function did some stuff and now it needs to send the contents of a specific listbox to a servlet.
Any ideas on how I could do that.One of the ideas that I have is to insert the listbox into a form and have a hidden submit button next to it .but I am not really sure how i could simulate a button click even from a javascript. function and is there a better way. ?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61202
    
  66

Nothing to do with JSP -- moved the HTML/JavaScript forum.

Why would you need to simulate a button click? Just call the form's submit() method.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Submit contents of a listbox from jsp to a serlvet