|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
-------
May 17, 2005 Here is the scenario. A simple HTML form exists on web page 1 (a static HTML page). Another HTML form exists on web page 2 (a static HTML page). The form on page 2 has several fields also found on the page 1 form. Both forms have a simple HTML submit button. The question. If both forms have input fields for 'name' and 'address' and the website viewer enters their name and address on the page 1 form first, how do you pre-populate the page 2 form with the viewers name and address so they do not have to re-enter the same information? Ambassador ------- |
|
||||
|
I can't think of a good way to retrieve the information for the second form bia any means other than to use server-side programming.
Here's a quick and not-optimized ASP sample for the second form: Code:
<%
Dim Customer_Name
Customer_Name = trim (Request.Form ("Customer_Name")
%>
<input type="hidden" name="Customer_Name" value="<% = Customer_Name %>" />
There would be a way to do this using Javascript, but then you'd have to rely on people enabling it.
__________________
Toronto Web Design | Search Engine Friendly, Standards-Compliant Layouts | Walk on my Path (my blog) |
|
|||
|
If a relative URL is used in:
<form method="POST" action=""> Instead of: <form method="POST" action="http://ww8.website.com">: Then $variable replacements may be used on the next page to fill in what your visitor typed on the previous page. Form1 <input type="text" name="first"> Form2 <input type="text" name="first" value="$first"> That should take care of the issue, of course you should validate the fields to ensure that they are filled out.
__________________
Silver Spring Real Estate | Southern Maryland Real Estate | Military Relocation Specialist |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |