This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes Passing input data between 2 forms. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Passing input data between 2 forms." Watch "Passing input data between 2 forms." New topic
Author

Passing input data between 2 forms.

Guy Yannick
Greenhorn

Joined: Sep 07, 2010
Posts: 5
Hello,

How can pass the property from form 1 to form2 ?






Thanks
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Welcome to JavaRanch!

You'd have to add a hidden parameter to one form and use JavaScript to set the hidden value on form submission.
Guy Yannick
Greenhorn

Joined: Sep 07, 2010
Posts: 5
David Newton wrote:Welcome to JavaRanch!

You'd have to add a hidden parameter to one form and use JavaScript to set the hidden value on form submission.


Thanks :)

It is possible to get the value without form submission ? by filling the input feld in form 1 ?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

There is no way to submit a value from one form through another form except through JavaScript.
Guy Yannick
Greenhorn

Joined: Sep 07, 2010
Posts: 5
David Newton wrote:There is no way to submit a value from one form through another form except through JavaScript.


Ok, youu means with the func onchange to set a htlm hidden in the another form ? any example ?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Not onchange, you'd want it to happen onsubmit. No example is necessary; there are a million examples of how to get and set form fields on the web.
Guy Yannick
Greenhorn

Joined: Sep 07, 2010
Posts: 5
I resolved the issue using the concept explaining hier...

thanks for your input
 
jQuery in Action, 2nd edition
 
subject: Passing input data between 2 forms.