
Solid, safe website tools.
Whatever your need, Will Bontrager builds powerful software solutions.
|
(Get Attention Ticker for your web site)
Auto-Filling Billing Fields With a ClickBy Will Bontrager This will show you how to make the shipping address fields in a form be copied to the billing address when a checkbox is checked. The example will be a simple form consisting of name and city. A live form asking for shipping and billing would have more fields. The two example fields are sufficient as an example. Here's the form:
Notice that the checkbox has an This JavaScript can be put above or below the form, or even in the head area of the web page source code. Notice the two lines that fill the billing fields with the shipping field values. Those lines will need to be changed according to your own form field names. Undoubtedly, additional lines will need to be added for additional form fields. When the JavaScript is launched, it first determines whether or not the checkbox is checked. Only if the checkbox is checked does it copy the form fields. March 10, 2006 Please note: Articles on this website are presented "as is". However - If you have a question about a CGI script, HTML, CSS, PHP, or JavaScript
Rate this blog post.
No page reload! |
|
|
© 1998-2001 William and Mari Bontrager |
|