Filling other fields automatically based on an answer selected from a drop down menu?

zurichexpat
zurichexpat used Ask the Experts™
on
I am creating a PDF document with teacher's names and I have created a drop down menu of the names. I would like another field to populate with the teacher's full address is their name is selected. This is my first attempt at using JavaScript and I have no idea where to put what and how. Thanks for your help!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2012
Top Expert 2008

Commented:
Here is the funny thing--I too "have no idea where to put what and how".  You would need to give us a little more information, please.

Author

Commented:
:-) right. One field would be a drop down menu of names and I would also like to have another field labeled address that is automatically populated with the address that corresponds to the name picked from the drop down menu. I don't have any more information than that.

Thanks.
Most Valuable Expert 2012
Top Expert 2008

Commented:
1) Did you want to use plain JavaScript or JQuery?

2) What do you need to know to get started?  Do you need to know the syntax for creating a script block?
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
I would like to use plain JavaScript.

I would like to know what the syntax is for creating the script and where do I add it into the document or what are the steps to adding it i.e., create custom action, etc.?

Thanks.
Most Valuable Expert 2012
Top Expert 2008

Commented:
What I guess I am trying to find out, is how much do you already know?  

1) Have you started looking at any tutorials?

JavaScript basics
https://developer.mozilla.org/en-US/Learn/Getting_started_with_the_web/JavaScript_basics

2) What are you using for a development environment (Visual Studio, Eclipse, ...)?

Author

Commented:
I know very little. I found this post here:

http://www.experts-exchange.com/Web_Development/Document_Imaging/Adobe_Acrobat/Q_23879710.html

...and think this is what I need to do but I was confused as to where this string would go in the PDF.
Most Valuable Expert 2012
Top Expert 2008
Commented:
I don't know that much about Acrobat Pro.  It looks like you need to find out how to work with Javascript for Adobe.

Adding JavaScript to forms
http://help.adobe.com/en_US/acrobat/X/pro/using/WS58a04a822e3e50102bd615109794195ff-7e03.w.html

Author

Commented:
Thanks for your help. Apologies for the goose chase.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial