Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

html -form data

 
akilan kandaswamy
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic