aspose file tools*
The moose likes JSP and the fly likes submit option value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "submit option value" Watch "submit option value" New topic
Author

submit option value

James Whillis
Ranch Hand

Joined: Jul 27, 2013
Posts: 35
I've got a form.



But when I submit it with

it does not submit selected option.( I mean I should be able to get but it's null)

I need to add option value manually to response or what's is wrong?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61652
    
  67

Try: $("#form-response").get(0).submit();


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
James Whillis
Ranch Hand

Joined: Jul 27, 2013
Posts: 35
Bear Bibeault wrote:Try: $("#form-response").get(0).submit();


It works!But what does get(0) give?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61652
    
  67

It's the difference between calling jQuery's submit() method (your original code), and calling the form's JavaScript submit() method.

The .get(0) fetches a reference to the first (and in this case only) element in the jQuery wrapped set.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: submit option value