Planet PDF Forum Archive

Planet PDF ForumWowsers! This is page is old, head to the LIVE Planet PDF Forum. It features more than 10 conferences, covering everything from beginner to in-depth developer and pre-press discussions. If you wish to continue... one & two archive covers 1999-2011 (160,000 pages).


New Forum | Previous | Next | (P-PDF) Beginners


Topic: Combo box tied to fields javascript question (Via Email), 1 Attachments
Conf: (P-PDF) Beginners, Msg: 111531
From: babycody
Date: 5/16/2004 12:24 AM

This is the entire Javascript below. I need to know how to tie the combo box (destination) with the text boxes street, citystatezip, and phone. I want the user to be able to pull down from the combo box (destination) and make a selection. The other fields will then fill in themselves. All help is appreciated. I know I am getting close to being finished. I have also attached the file below. :)

//-------------------------------------------------------------
//-----------------Do not edit the XML tags--------------------
//-------------------------------------------------------------

//
//city state zip
//
/*********** belongs to: ACRO_Document-Level.city state zip ***********/
var gcitystatezip = new Array(); //Create a reference to a new array

//Load the array up with addresses of the destinations
gcitystatezip["ALB"] = "Albuquerque, NM 87121";
gcitystatezip["ATL"] = "Atlanta, GA 30369-9751";
gcitystatezip["BUF"] = "Buffalo, NY 14240-9998";
gcitystatezip["CHI"] = "Forest Park, IL 60130-9998";
gcitystatezip["CIN"] = "Cincinnati, OH 45235-9998";
gcitystatezip["DAL"] = "Dallas, TX 75398-9998";
gcitystatezip["DES"] = "Des Moines, IA 50395-9998";
gcitystatezip["DEN"] = "Denver, CO 80217-2000";
gcitystatezip["DET"] = "Allen Park, MI 48101-9997";
gcitystatezip["GRE"] = "Greensboro, NC 27495-0001";
gcitystatezip["JAC"] = "Jacksonville, FL 32099-0510";
gcitystatezip["KAN"] = "Kansas City, KS 66106-1042";
gcitystatezip["LOS"] = "Bell, CA 90201-9997";
gcitystatezip["MEM"] = "Memphis, TN 38136-9998";
gcitystatezip["MPL"] = "Eagan, MN 55121-2288";
gcitystatezip["NJY"] = "Jersey City,NJ 07097-9998";
gcitystatezip["OKL"] = "Oklahoma City, OK 73119-5101";
gcitystatezip["PIT"] = "Warrendale, PA 15095-1000";
gcitystatezip["PHI"] = "Philadelphia, PA 19116-9998";
gcitystatezip["PHO"] = "Phoenix, AZ 85026-9998";
gcitystatezip["SAL"] = "Salt Lake City, UT 84199-9781";
gcitystatezip["SAN"] = "Richmond, CA 94804-9751";
gcitystatezip["SEA"] = "Federal Way, WA 98003-6721";
gcitystatezip["SPR"] = "Springfield, MA 01152-9751";
gcitystatezip["STL"] = "Hezelwood, MO 63042-2487";
gcitystatezip["WDC"] = "Capital Heights, MD 20743-9998";
gcitystatezip["ALOS"] = "Santa Fe Springs, CA 90670";
gcitystatezip["ASEA"] = "Kent, WA 98032";
gcitystatezip["ATEX"] = "Irving, TX 75060";
gcitystatezip["ADAY"] = "Clayton, OH 45315";
gcitystatezip["ASAN"] = "Hayward, CA 94544";
gcitystatezip["ADET"] = "Romulus, MI 48174";
gcitystatezip["ASPR"] = "Northborough, MA 01532";
gcitystatezip["ANJY"] = "Clifton, NJ 07011";
gcitystatezip["APHI"] = "Pottstown, PA 19464";
gcitystatezip["AMEM"] = "Memphis, TN 38118";
gcitystatezip["AYOU"] = "North Lima, OH 44452";
gcitystatezip["AATL"] = "Atlanta, GA 30336";
gcitystatezip["AJAC"] = "Orlando, FL 32819";
gcitystatezip["AGRE"] = "Charlotte, NC 28214";
gcitystatezip["AKAN"] = "Shawnee, KS 66214";
gcitystatezip["ASTL"] = "Hazelwood, MO 63042";
gcitystatezip["ADEN"] = "Denver, CO 80216";
gcitystatezip["ASAL"] = "Salt Lake City, UT";
//

//


//
//phone
//
/*********** belongs to: ACRO_Document-Level.phone ***********/
var gphone = new Array(); //Create a reference to a new array

//Load the array up with addresses of the destinations
gphone["ALB"] = "505-833-9554";
gphone["ATL"] = "404-792-3126";
gphone["BUF"] = "716-846-2415";
gphone["CHI"] = "708-583-4290";
gphone["CIN"] = "513-733-7227";
gphone["DAL"] = "214-467-5800";
gphone["DES"] = "515-278-7679";
gphone["DEN"] = "303-853-2547";
gphone["DET"] = "313-337-2295";
gphone["GRE"] = "336-855-4318";
gphone["JAC"] = "904-783-7115";
gphone["KAN"] = "913-573-2520";
gphone["LOS"] = "323-729-4262";
gphone["MEM"] = "901-947-7675";
gphone["MPL"] = "651-681-2226";
gphone["NJY"] = "201-714-6809";
gphone["OKL"] = "405-685-6605";
gphone["PIT"] = "724-776-6248";
gphone["PHI"] = "215-671-7626";
gphone["PHO"] = "602-225-3491";
gphone["SAL"] = "801-974-2558";
gphone["SAN"] = "510-528-9780";
gphone["SEA"] = "253-874-7361";
gphone["SPR"] = "413-785-6420";
gphone["STL"] = "314-895-9271";
gphone["WDC"] = "301-499-7331";
gphone["ALOS"] = "562-906-6300x218";
gphone["ASEA"] = "253-216-1000";
gphone["ATEX"] = "972-579-3431x284";
gphone["ADAY"] = "937-832-2293";
gphone["ASAN"] = "510-324-6500x109";
gphone["ADET"] = "734-946-0725";
gphone["ASPR"] = "508-393-4423";
gphone["ANJY"] = "973-345-9002";
gphone["APHI"] = "610-495-8191";
gphone["AMEM"] = "901-367-0110";
gphone["AYOU"] = "330-549-2039";
gphone["AATL"] = "404-629-5566";
gphone["AJAC"] = "407-854-0284";
gphone["AGRE"] = "704-395-9501";
gphone["AKAN"] = "913-268-7995";
gphone["ASTL"] = "314-895-9554";
gphone["ADEN"] = "303-472-9821";
gphone["ASAL"] = "801-330-0765";
//

//


//
//street
//
/*********** belongs to: ACRO_Document-Level.street ***********/
var gstreet = new Array(); //Create a reference to a new array

//Load the array up with addresses of the destinations
gstreet["ALB"] = "7601 Bluewater NW"; //ALB's address is 7601 Bluewater NW
gstreet["ATL"] = "1800 James Pkwy NW"; // ...etc.
gstreet["BUF"] = "1200 William St. Room 100";
gstreet["CHI"] = "7500 W. Roosevelt Rd.";
gstreet["CIN"] = "3055 Crescentville Rd.";
gstreet["DAL"] = "2400 DFW Turnpike";
gstreet["DES"] = "4000 109th St.";
gstreet["DEN"] = "7755 E. 56th Ave.";
gstreet["DET"] = "17500 Oakwood Blvd.";
gstreet["GRE"] = "3701 W. Wendover Ave.";
gstreet["JAC"] = "7415 Commonwealth Ave.";
gstreet["KAN"] = "4900 Speaker Rd.";
gstreet["LOS"] = "5555 Bandin Blvd.";
gstreet["MEM"] = "1921 Elvis Presley Blvd.";
gstreet["MPL"] = "3165 S. Lexington Ave.";
gstreet["NJY"] = "80 County Rd.";
gstreet["OKL"] = "5700 S. Portland";
gstreet["PIT"] = "300 Brush Creek Rd.";
gstreet["PHI"] = "1900 Byberry Rd.";
gstreet["PHO"] = "4949 E Van Buren St.";
gstreet["SAL"] = "1795 West 2100 S";
gstreet["SAN"] = "2501 Rydin Road";
gstreet["SEA"] = "34301 9th Ave. S";
gstreet["SPR"] = "1800 Page Blvd.";
gstreet["STL"] = "5800 Phantom Dr.";
gstreet["WDC"] = "9201 Edgeworth Drive";
gstreet["ALOS"] = "9939 Norwalk Blvd.";
gstreet["ASEA"] = "6215 S. 228th Street";
gstreet["ATEX"] = "1501 South Loop 12";
gstreet["ADAY"] = "53-71 Lau Parkway";
gstreet["ASAN"] = "1099 Whipple Road";
gstreet["ADET"] = "29149 Airport Drive #17";
gstreet["ASPR"] = "41 Lyman Street";
gstreet["ANJY"] = "203 Kuller Road";
gstreet["APHI"] = "321 Jones Blvd.";
gstreet["AMEM"] = "4755-2 Burbank Road";
gstreet["AYOU"] = "100 Eastgate Dr.";
gstreet["AATL"] = "1100 Westlake Pkwy. Ste. 100";
gstreet["AJAC"] = "7469 Kingspointe Pkwy #300";
gstreet["AGRE"] = "1700 Westpointe Dr. Ste. D";
gstreet["AKAN"] = "10810 W 78th Street";
gstreet["ASTL"] = "131 Byassee Dr.";
gstreet["ADEN"] = "11175 East 55th St.";
gstreet["ASAL"] = "5185 Harold Gatty Drive";
//

//


//
//DATE.ACRO_Calculate
//
/*********** belongs to: AcroForm.DATE.ACRO_Calculate ***********/
function _Date() {
var tempDate = new Date();
var result = "";
var temp = tempDate.getMonth()+1;
if (temp < 10) result += "0";
result += (temp + "/");
temp = tempDate.getDate();
if (temp < 10) result += "0";
result += (temp + "/");
temp = tempDate.getFullYear();
result += temp;
return(result);
}
event.value = _Date()
//

//


//
//destination.ACRO_Keystroke
//
/*********** belongs to: AcroForm.destination.ACRO_Keystroke ***********/
var street = this.getField("street");

if (event.changeEx in gdestination);
street.value = gdestination[event.changeEx];
//

//


//
//FillText34.ACRO_Calculate
//
/*********** belongs to: AcroForm.FillText34.ACRO_Calculate ***********/
function _Sum() {
var total = 0;
for (var count=0; count<_Sum.arguments.length; count++) {
if ( _Sum.arguments[count] )
total += _Sum.arguments[count];
}
return(total);
}
event.value = _Sum((this.getField("FillText4")).value,(this.getField("FillText11")).value,(this.getField("FillText19")).value,(this.getField("FillText26")).value,(this.getField("FillText44")).value,(this.getField("FillText50")).value,(this.getField("FillText56")).value,(this.getField("FillText62")).value,(this.getField("FillText68")).value,(this.getField("FillText74")).value,(this.getField("FillText80")).value,(this.getField("FillText86")).value,(this.getField("FillText92")).value,(this.getField("FillText98")).value,(this.getField("FillText104")).value,(this.getField("FillText110")).value,(this.getField("FillText116")).value,(this.getField("FillText122")).value,(this.getField("FillText134")).value,(this.getField("FillText140")).value,(this.getField("FillText146")).value,(this.getField("FillText152")).value,(this.getField("FillText158")).value,(this.getField("FillText164")).value,(this.getField("FillText170")).value,(this.getField("FillText176")).value,(this.getField("FillText182")).value)
//

//


//
//FillText35.ACRO_Calculate
//
/*********** belongs to: AcroForm.FillText35.ACRO_Calculate ***********/
function _Sum() {
var total = 0;
for (var count=0; count<_Sum.arguments.length; count++) {
if ( _Sum.arguments[count] )
total += _Sum.arguments[count];
}
return(total);
}
event.value = _Sum((this.getField("FillText9")).value,(this.getField("FillText18")).value,(this.getField("FillText25")).value,(this.getField("FillText43")).value,(this.getField("FillText49")).value,(this.getField("FillText55")).value,(this.getField("FillText61")).value,(this.getField("FillText67")).value,(this.getField("FillText73")).value,(this.getField("FillText79")).value,(this.getField("FillText85")).value,(this.getField("FillText91")).value,(this.getField("FillText97")).value,(this.getField("FillText103")).value,(this.getField("FillText109")).value,(this.getField("FillText115")).value,(this.getField("FillText121")).value,(this.getField("FillText133")).value,(this.getField("FillText139")).value,(this.getField("FillText145")).value,(this.getField("FillText151")).value,(this.getField("FillText157")).value,(this.getField("FillText163")).value,(this.getField("FillText169")).value,(this.getField("FillText175")).value,(this.getField("FillText181")).value,(this.getField("FillText187")).value)
//

//




Click to open!BLANK BOL.FORM3.pdf
Bill of Laden (114,214 bytes)


PDF In-Depth Free Product Trials Ubiquitous PDF

Debenu Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link...

Download free demo

Debenu PDF Tools Pro

It's simple to use and will let you preview and edit PDF files, it's a Windows application that makes...

Download free demo

Back to the past, 15 years ago! Open Publish 2002

Looking back to 2002, it's amazing how much of the prediction became a reality. Take a read and see what you think!

September 14, 2017
Platinum Sponsor





Search Planet PDF
more searching options...
Planet PDF Newsletter
Most Popular Articles
Featured Product

Debenu PDF Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link control. Take Acrobat to the next level.

Features

Adding a PDF Stamp Comment

OK, so you want to stamp your document. Maybe you need to give reviewers some advice about the document's status or sensitivity. This tip from author Ted Padova demonstrates how to add stamps with the Stamp Tool along with related comments.