473,385 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

ship to bill to

I have a form with ship to customer and bill to customer fields. Both of
these are required fields. I want to put a check box in the form and if the
check box is checked then the value of the ship to customer is loaded into
the bill to customer. I need this to happen before the form is submitted.

The person fills in the ship to customer and if the bill to customer is the
same then they just check the box and the same value is automatically
entered. If they are different then he just types the bill to customer in.
Any help on this would be appreciated. Thanks!

Darren
Jul 23 '05 #1
3 1456
Darren wrote:
I have a form with ship to customer and bill to customer fields. Both of
these are required fields. I want to put a check box in the form and if the
check box is checked then the value of the ship to customer is loaded into
the bill to customer. I need this to happen before the form is submitted.
[...]


RTFM. RTFFAQ.

<form ...>
<input type="checkbox" name="shipmentEqualsBill"
onclick="if (this.checked)
this.form.elements['shipmentAddress'].value =
this.form.elements['billing'].value;">
<textarea name="shipmentAddress"></textarea>
<textarea name="billingAddress"></textarea>
</form>

This won't work if client-side scripting is not present or if it
is disabled, so also do server-side checks (which is because this
client-side solution can only be cosmetic).

Remove the line-break within the attribute values for XHTML documents.
PointedEars
--
Wealth is too precious to be entrusted to the Rich.
(Anonymous Kalderan Proverb, Circa C.Y. 500; from: "Andromeda")
Jul 23 '05 #2
Thomas 'Ingrid' Lahn wrote:
<form ...>
<input type="checkbox" name="shipmentEqualsBill"
onclick="if (this.checked)
this.form.elements['shipmentAddress'].value =
this.form.elements['billing'].value;"> 'billingAddress'
<textarea name="shipmentAddress"></textarea>
<textarea name="billingAddress"></textarea>
</form>
[...]

PointedEars
Jul 23 '05 #3
JRS: In article <40**************@PointedEars.de>, seen in
news:comp.lang.javascript, Thomas 'PointedEars' Lahn
<Po*********@nurfuerspam.de> posted at Thu, 8 Jul 2004 00:43:24 :
Thomas 'Ingrid' Lahn wrote:


False attributions are contrary to Usenet etiquette; the cited article
was not identifiably written by Ingrid.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME ©
Web <URL:http://www.uwasa.fi/~ts/http/tsfaq.html> -> Timo Salmi: Usenet Q&A.
Web <URL:http://www.merlyn.demon.co.uk/news-use.htm> : about usage of News.
No Encoding. Quotes before replies. Snip well. Write clearly. Don't Mail News.
Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Bill Davy | last post by:
I am working with MSVC6 on Windows XP. I have created an MSVC project called SHIP I have a file SHIP.i with "%module SHIP" as the first line (file is below). I run SHIP.i through SWIG 1.3.24...
14
by: Me_and_you | last post by:
From: http://evan.quuxuum.org/bgnw.html#Worth Interesting stuff. read for yourself: ---------------------- How much is Bill worth right now? We obviously do not have a full reckoning of...
0
by: Peter Sands | last post by:
Hi, I have setup a stand-by db2 DB server, I want to test the log shipping method. Do I just issue a 'list history..' on the source server to get the logs I need to ship. Then copy those logs...
4
by: Gaetano Mendola | last post by:
Is someone taking care about the fact that the pgdb.py shipped with 7.4.1 is the wrong version? What bail me out is the fact that the version pgdb.py shipped with 7.4.1 is a version *pre 7.3*; we...
17
by: John Bailo | last post by:
What does he do all day? Find out here: http://channel9.msdn.com/Showpost.aspx?postid=163166
1
by: U S Contractors Offering Service A Non-profit | last post by:
" Mentor-ship applied for November 8th 2006 " Craig Somerford to Harvard, Apple, Google, (bcc:Natural), (bcc:Matthew), (bcc:National), (bcc:Letters) Hide options 9:41 am (0 minutes ago) From:...
5
by: basoul | last post by:
I have to make a game with 15 x 26 grid sigular array (array of 390 charecters) and im supose to load the ships which are charecters horozontally. only 4 are needed and the function im stuck on is...
5
by: shardul316 | last post by:
following program is compiled with zero errors but still i am getting wrong output can anybody find where i am wrong so as to get correct output #include<iostream> using namespace std; int main()...
1
by: =?Utf-8?B?Sm9zdWZm?= | last post by:
Hi: I've been using MSN Bill Pay for years to pay my bills. I recently decided to look into Microsoft Money as I wanted a desktop application to manage and pay my bills. I downloaded the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.