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  html -form data Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark " html -form data" Watch " html -form data" New topic
Author

html -form data

akilan kandaswamy
Greenhorn

Joined: Feb 26, 2001
Posts: 4
hai
i have a input type textfield
and i want to get data from the same textfield for two different servlets using two submit buttons how can i do that? is it possible using java script etcc.. pls help
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6913
Sure. Set up as many buttons as you like in the form with the field in it. In the onclick handler for each button you can put JavaScript code to either submit the form, as is, to the specified "action" URL OR modify the "action" URL of the current form to some other URL and then submit the form OR copy the value from the field to a hidden field in another form with a different "action" URL, and submit that.



A Convergent Visionary ~ Frank's Punchbarrel Blog ~ LinkedIn profile
 
 
subject: html -form data
 
IntelliJ Java IDE

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture