Re: populate fields of 2nd form from 1st?
by "Darrell King" <darrell(at)webctr.com>
||Tue, 5 Sep 2000 07:51:44 -0400
cookie if the second form is under the same domain as the first. Of course,
a user without JS doesn't get the benefit of the effect...
By far, the most elegant way is to user server-side scripting. I would use
Perl, and others might choose PHP, ASP or another option. The common
denominator, though, is that the forms are dynamically generated by the
script at the server level, which means anything you want can be included
As a side note, these forms are so useful and versatile that they are now a
standard part of my company's new site designs. Besides carrying fields,
they also include error checking that returns to user to an unchanged form
for corrections and they can change configuration according to the user's
----- Original Message -----
>We have a job where we'd like information entered in the fields
>of a form on one page, to populate some of the fields on another.
>The fields whose values are to be copied over will be of the same
>type and length.
some variables in the frameset page, like
In the form, use an onSubmit script to fill these variables with the stuff
the user has filled in, like:
top.formname = document.forms.name.value;
top.formaddress = document.forms.address.value;
If you load a new form page, use an onLoad script to see if the variables
are filled, and if they are write them to the form:
if (top.formname) document.forms.name.value = top.formname;
if (top.formaddress) document.forms.address.value = top.formaddress;
Hope this is clear,
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA