Changing from Acrobat to Livecycle

I use the attached script as a document Javascript called 'SetFieldValues' in Adobe Acrobat. It gets its value from a drop-down box called 'locationdropdown'.

It works great, however we are changing our forms to have flowable content so I have to re-build them with LiveCycle Designer (version 8 if that matters). How and where can I establish this script to work properly in Livecycle. Would it still need to be a document script or do I need to add it to the drop down box scripting somehwere?

I can add files if that would help. Thank you for any assistance!
// Locations Pre-population Data

var DeptData = { Augusta:{  location: "Augusta League of Therapists",
                               address: "336 S. Wayne Ave Waynesboro, Va 22980 ph 540.949.7045 fax 540.949.8897",
                               },
                 Charlottesville:{ location: "Charlottesville League of Therapists",
                               address: "911 East Jefferson Street Charlottesville, VA 22901 ph 434.984.0023 fax 434.984.4852",
                               },
                 Culpeper :{  location: "Culpeper League of Therapists",
                               address: "120 Sycamore Street Culpeper, VA 22701 ph. 540.829.4006 fax 540.829.0440",
                               },
		 Danville :{   location: "Danville League of Therapists",
                               address: "1045 Main St. Suite 4, Danville, VA 24541 ph. 434.791.4131 fax ",
                               },
                 Harrisonburg :{   location: "Harrisonburg League of Therapists",
                               address: "312 S. Main St. Harrisonburg, Va 22801 ph. 540.437.1605 fax 540.437.1606",
                               },
                 Lynchburg:{  location: "Lynchburg League of Therapists",
                               address: "523 Clay Street Lynchburg, VA 24504 ph.434.455.7990 fax 434.455.0256",
                               },
                 "New River":{ location: "New River League of Therapists",
                               address: "7350 Peppers Ferry Blvd Fairlawn, VA 24141 ph.540.633.3816 fax 540.633.3819",
                               },
                 "Richmond Area":{  location: "Greater Richmond League of Therapists",
                               address: "10100 Iron Bridge Rd. Suite 102 Richmond, Va 23832 ph.804.778.7443 fax 804.778.7446",
                               },
                 Roanoke :{   location: "Roanoke League of Therapists",
                               address: "1420 3rd Street SW Roanoke, VA 24016 ph. 540.343.3577 fax 540.343.3866",
                               },
                 "Rockbridge Area" :{   location: "Rockbridge League of Therapists",
                               address: "2424 Magnolia Ave. Buena Vista, VA 24416 ph. 540.264.0100 fax 540.264.0167",
                               },
                " Choose Location" :{   location: "Choose Location from drop down",
                               address: " ",
                               },




};

function SetFieldValues(cDeptName)
{
// Populate fields with values from the Department Data Object
   this.getField("Location").value = DeptData[cDeptName].location;
   this.getField("Address").value = DeptData[cDeptName].address;
   
}

Open in new window

jshifftyAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mohan_sekarCommented:
You can set the default values in the "initialize" evnet of the dropdown list box.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Acrobat

From novice to tech pro — start learning today.