File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes How to post the form when the user selects a row of a table  without clicking on a submit button? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to post the form when the user selects a row of a table  without clicking on a submit button?" Watch "How to post the form when the user selects a row of a table  without clicking on a submit button?" New topic
Author

How to post the form when the user selects a row of a table without clicking on a submit button?

John-Philippe Verger
Greenhorn

Joined: Feb 18, 2008
Posts: 25
Hi all,
I have an html form , and there is a table of eight rows and two columns in this form .The name of the form is Collect_Form, and I use the method POST to post the form Collect_Form to a servlet named ProcessingServlet .
I would want that when a user selects(or clicks) a row of the table, the form is posted to the servlet (I don't want the user to be obliged to click on a submit button every time he has to select or click a row of the table).
How can I achieve this?
Thanks you.


David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Set an onclick handler for the <tr> that submits the form? (Not entirely sure this will work--may need to do at <td> level, I'm never sure.)
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61106
    
  66

A click handler can be established on the <tr>.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to post the form when the user selects a row of a table without clicking on a submit button?