File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Multiaction form or form data outside a form. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "Multiaction form or form data outside a form." Watch "Multiaction form or form data outside a form." New topic
Author

Multiaction form or form data outside a form.

Maciej Wysocki
Greenhorn

Joined: Aug 21, 2006
Posts: 1
Hello,

How to run (one of many) action with form data.

More specific...

I have a table, with radio button in each row with id value.
I want to fire some action with selected identifier.

The greatest solution for me is to use links points to differents servlets (for show, modify, delete row). But when I use a href I don't have a form values.

I can do this with javascript, it would be great not using js.
I can also do something similar putting my actions to select element in form and handle action by one servlet defined in form action.

Any best practices for this basic problem?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56207
    
  13

Avoiding Javascript when it's the most appropriate tool for the job doesn't make a lot of sense.

Generally, in cases where more than one action needs to take place for a form submission, I'll use a small Javascript snippet to swap out the form action.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Multiaction form or form data outside a form.
 
Similar Threads
Unclear on what's happening with validation
Finding out the components in a row of aDataTable
Transferring table data using struts
Struts 1 :- Two Form submission from one jsp using one submit button
selecting a table row with 3 columns and sending it to another page.