| | Submitted on: 8/25/2002 1:15:50 AM
By: David Nishimoto
Level: Beginner User Rating:
By 1 Users Compatibility:JavaScript
Users have accessed this article 900 times. | (About the author) |
| | Over View: The ShipToTransferBillTo function
is called with a user selects the checkbox indicating that the
BillTo information is the same as the ShipTo information. By
deselecting the checkbox the BillTo fields are blanked out. One
important feature to this code snippet is to name the form, "frmMain".
The elements collection belongs to frmMain.
| |
|
Terms of Agreement:
By using this article, you agree to the following terms...
1) You may use
this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
2) You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.
3) You may link to this article from another website, but ONLY if it is not wrapped in a frame.
4) You will abide by any additional copyright restrictions which the author may have placed in the article or article's description. |
Downloadable Javascript Functions Huddle
Function: ShipToTransferBillTo()
What Does The Function Do?:
Transfer ShipTo field information to BillTo field information
Author: David Nishimoto
eMail: davepamn@relia.net
Website Url: http://www.listensoftware.com/javascript.html
Over View: The ShipToTransferBillTo function
is called with a user selects the checkbox indicating that the
BillTo information is the same as the ShipTo information. By
deselecting the checkbox the BillTo fields are blanked out. One
important feature to this code snippet is to name the form, "frmMain".
The elements collection belongs to frmMain.
< form name=frmMain>
<input type=checkbox name=chkBillShipSame value=1 OnClick="ShipToTransferBillTo()">BillTo information is same as ShipTo
</form>
<script language="javascript">
function ShipToTransferBillTo()
{
if (frmMain.elements("chkBillShipSame").checked==1)
{
frmMain.elements("txtBillToAddress1").value=frmMain.elements("txtShipToAddress1").value;
frmMain.elements("txtBillToAddress2").value=frmMain.elements("txtShipToAddress2").value;
frmMain.elements("txtBillToCity").value=frmMain.elements("txtShipToCity").value;
frmMain.elements("txtBillToZipCode").value=frmMain.elements("txtShipToZipCode").value;
frmMain.elements("txtBillToPhone").value=frmMain.elements("txtShipToPhone").value;
}
else
{
frmMain.elements("txtBillToAddress1").value="";
frmMain.elements("txtBillToAddress2").value="";
frmMain.elements("txtBillToCity").value="";
frmMain.elements("txtBillToZipCode").value="";
frmMain.elements("txtBillToPhone").value="";
}
}
| |
Other 1 submission(s) by this author
|
|
|
Report Bad Submission |
|
|
Your Vote! |
See Voting Log |
|
Other User Comments |
There are no comments on this submission. |
|
Add Your Feedback! |
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.
NOTICE: The author of this article has been kind enough to share it with you. If you have a criticism, please state it politely or it will be deleted.
For feedback not related to this particular article, please click here. |
|