aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes get parameter from another Form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "get parameter from another Form" Watch "get parameter from another Form" New topic

get parameter from another Form

Barry Andrews
Ranch Hand

Joined: Sep 05, 2000
Posts: 523

Can anyone tell me if it is possible to get a parameter from another Form (on the same HTML page) and submit the values along with the Form that is being submitted? For example, I have a text field in Form 1 (same page) and I want to be able to get the value of the field and submit that along with data from Form 2. There should be a way to do this task with JavaScript. If someone could kindly point the way?
Many thanks,
Shubhrajit Chatterjee
Ranch Hand

Joined: Aug 23, 2001
Posts: 356
In form one, have a hidden field say ... hid1
then do this from javascript
document.form1.hid1.value = dcoument.form2.someinputfield.value

Barry Andrews
Ranch Hand

Joined: Sep 05, 2000
Posts: 523

Brilliant! Thanks a lot!
I agree. Here's the link:
subject: get parameter from another Form
Similar Threads
Text Field Values
Need Some Help Here
using primitives in spring binding
Sending checkbox value to two different servlet page
How to pass a Post parameter using a link?