• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
John-Philippe Verger
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64620
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A click handler can be established on the <tr>.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic