×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

passing data between forms

passing data between forms

passing data between forms

(OP)
Hi all,
I am trying to pass user data(such as selections made in a drop down list) to a different form where the data has to be displayed in the form of a table. However I do not want to submit the new form to the server yet. After the data has been passed to the new form, the user fills out the remaining portions of the main form and  I will have to submit the main form and the new form both to the server. I have used CGI and Javascript to build the main form. Can anyone give me pointers on how should I proceed.
Thanks,
Pavan

RE: passing data between forms

write the data from the first form to a file on the server and read it back whenever needed. You could also use hidden form fields on the second form and store the data from the first form that way and send it with the final form submission. That would require the second form be generated dynamically by a script. The CGI.pm module can handle this type of stuff no problem assuming you are  using perl as the backend.

RE: passing data between forms

(OP)
Hi Kevin,
Thanks for the suggestions. I have a few questions though. Right now I am trying to open the new form  by  a window.open function resulting from a onclick event handler of a button from the main form, Can I reference the parent forms elements using the cgi->param operator? I am confused because all  the user selections in the parent form are stored as javascript variables and I am not sure no how to store these in the database.
Thanks for the help
Pavan

RE: passing data between forms

If you're using Perl, I'd suggest looking into CGI::Sessions as well.  This module takes care of storing the information for you in either a database or flat file for future use.

 - George

RE: passing data between forms

(OP)
Hi
Thanks for the suggestions , but I still hava doubt because I have a main form which has a action event which is triggered when a submit button is pressed. But then I have an additional button in the main form which on click should open a new form to which i need to pass values from the main form. I am confused on how to open a new form from the button click as a form can have only one action event associated to it.It would be great if anyone can help me out.
Pavan

RE: passing data between forms

It sounds to me like you're mixing things that you should be doing with Perl/CGI and javascript.

If you want to open a second form (page) with the content filled in on the first form without submitting to the server, then you'll have to use something that will work completely on the client side, e.g. javascript.

Once you have all of your inputs completed on the client side, then submit to the server via a CGI Form Action.

'hope this helps

If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close