We help IT Professionals succeed at work.

Putting form data from one form to another form

morya
morya asked
on
237 Views
Last Modified: 2010-04-09
I have a form.  When a person fills it out I want that data to populate some fields in a different form.

What is the quick and easy way to do this?

Michael
Comment
Watch Question

Commented:
There are ways to do it using a back end tools, like ASP etc. but on the clients side I doubt there is any avaliable thing which can do this.

1. You can try to use dhtml in the same page and hide the previoud data and put the new data.

2. Else, Open a new window with a handle and use window.document handle to write to the new window.

Hope this will help you.
If you want any specific code ,please specify.

Author

Commented:
I don't know asp.  Would it be something I could just patch in the html code?

I'm not sure what you mean with using a handle in a new window.

Could you explain?

Michael

Commented:
x=window.open('xyz.html','Title,"...");
Here x is the handle for the new window.
What you have to do is build up your complete page based on x.document.write
Javascript. This is generally used for some small display of help but not for a full fledged web page( Though you may use it).

If you are not using any server side contents ( ASP, Perl etc. ) then apart from already mentioned you can also try
it with
1.  cookies. Build a cookie in parent form and read it in the new form.
2.  Transfer the data as a parameter in the href and use substring of the href script using javascript.

If you tell me the code Maybe I can help you better.
Anand
Easiest way would be to use JavaScript which would be relatively easy to do.

Author

Commented:
rhinosaur,

Do you have any java script code or point me to some?
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.