Click to See Complete Forum and Search --> : Pass data in Hidden Fields


rak
07-25-2003, 09:43 PM
I have two forms- say FormA and FormB in the same page. Is it possible to pass the values from FormA to the hidden fields of FormB. I am sending the form data to different URL's. The user enters data once, so knowing an easy way to assign FormA variable/values to hidden fields of FormB will be useful.

Thanks.

David Harrison
07-26-2003, 01:33 PM
This should work, I made the input fields of formb into text fields so that you can see the effect:

rak
07-26-2003, 09:28 PM
Thanks for the suggestion using Javascript. Actually I was wondering if one can pass values from FormA into FormB's hidden fields without pressing an explicit button.

PeOfEo
07-27-2003, 12:51 AM
well the user has to do something, I mean it cant do it on its own. What did you have in mind. On text box change or something of that nature?

rak
07-27-2003, 09:58 AM
I was hoping for (if it is possible) a direct way to assign values from FormA to hidden fields in FormB, so that when the user presses the submit button in FormB, the values of FormA are also submitted to the server.

Thanks.

PeOfEo
07-27-2003, 04:08 PM
Wait wait wait, are you trying to recorde these values? How the heck are you planning to do that eh? If you are I would suggest picking up a nice big book on a server side language.