Highlighted

Javascript for Drop down menus

New Here ,
Sep 07, 2020

Copy link to clipboard

Copied

Hi all, I would like some help with a Javascript. I am trying to create drop down menus that when a category is selected from the first drop down menu, the second drop down menu will auto-populate with options relating to that category. For example:

I would like my first drop down menu to have 2 options, first one being 'Material Classifications' and the second being 'Machine Classifications'

When 'Material Classifications' is selected from the first drop down menu, I would like the second drop down menu to auto populate with the following:

Fuel - Diesel

Fuel - ULP

Lubrication - Fluid

Lubrication - Grease
Lubrication - Oil

Coolant

Surface Coating - Acid

Surface Coating - Paint

Surface Coating - Solvent

Gases - Acetylene

Gases - Argon

Gases - Nitrogen

Gases - Oxygen

Gases - Refrigerant

Gases - Argoshield (Ar, O, Co2)

Electrodes - E308

Electrodes - E410

Electrodes - E7018

Electrodes - E71T

Electrodes - ENi-CL

Electrodes - ER5154

Electrodes - ER70S

Electrodes - Paste/Powder

No Category

When 'Machine Classifications' is selected from the first drop down menu, I would like the second drop down menu to auto populate with the following:

Bus

Car

Light Goods Vehicle <3.5T

Medium Goods Vehicle 3.5 - 12T

Heavy Goods Vehicle 12-15T

Very Heavy Goods Vehicle >25

Miscellaneous

Road Grader

Off Highway Truck

Roller/Compactor

Scraper

Stationary Large Engines >450KW

Stationary Small Engines <450KW

Track Loaders with bucket

Bulldozer

Wheeled Dozer

Wheeled Loader

Tractor

No Category

I am using Adobe Acrobat X Pro. I am familar with javascript but still would consider myself a beginner. I thought I had the correct Javascript but no luck. Any one able to provide me with steps & javascript for the above? TIA.

 

TOPICS
Acrobat SDK and JavaScript, How to, PDF forms

Views

67

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Javascript for Drop down menus

New Here ,
Sep 07, 2020

Copy link to clipboard

Copied

Hi all, I would like some help with a Javascript. I am trying to create drop down menus that when a category is selected from the first drop down menu, the second drop down menu will auto-populate with options relating to that category. For example:

I would like my first drop down menu to have 2 options, first one being 'Material Classifications' and the second being 'Machine Classifications'

When 'Material Classifications' is selected from the first drop down menu, I would like the second drop down menu to auto populate with the following:

Fuel - Diesel

Fuel - ULP

Lubrication - Fluid

Lubrication - Grease
Lubrication - Oil

Coolant

Surface Coating - Acid

Surface Coating - Paint

Surface Coating - Solvent

Gases - Acetylene

Gases - Argon

Gases - Nitrogen

Gases - Oxygen

Gases - Refrigerant

Gases - Argoshield (Ar, O, Co2)

Electrodes - E308

Electrodes - E410

Electrodes - E7018

Electrodes - E71T

Electrodes - ENi-CL

Electrodes - ER5154

Electrodes - ER70S

Electrodes - Paste/Powder

No Category

When 'Machine Classifications' is selected from the first drop down menu, I would like the second drop down menu to auto populate with the following:

Bus

Car

Light Goods Vehicle <3.5T

Medium Goods Vehicle 3.5 - 12T

Heavy Goods Vehicle 12-15T

Very Heavy Goods Vehicle >25

Miscellaneous

Road Grader

Off Highway Truck

Roller/Compactor

Scraper

Stationary Large Engines >450KW

Stationary Small Engines <450KW

Track Loaders with bucket

Bulldozer

Wheeled Dozer

Wheeled Loader

Tractor

No Category

I am using Adobe Acrobat X Pro. I am familar with javascript but still would consider myself a beginner. I thought I had the correct Javascript but no luck. Any one able to provide me with steps & javascript for the above? TIA.

 

TOPICS
Acrobat SDK and JavaScript, How to, PDF forms

Views

68

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Sep 07, 2020 0
Contributor ,
Sep 08, 2020

Copy link to clipboard

Copied

Do you have code we can help you with? Or do you want someone to write code for you?

if it's second case I could do it for a fee, if you'r interested send me PM.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 08, 2020 0
New Here ,
Sep 08, 2020

Copy link to clipboard

Copied

Hi, thanks for your reply. I am working on a form for my work and didn't realise javascript was usually issued for a fee. I have previously used and sourced javascript for other areas of work, so I would like to learn myself if possible but thank you for the offer.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 08, 2020 0
New Here ,
Sep 08, 2020

Copy link to clipboard

Copied

I did have a code I was working on and felt I was getting really close to acheiving what I wanted, I will try go back and find the code I was working with and see if that helps. Maybe someone could point out where I was going wrong 🙂 Thanks again for your reply

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 08, 2020 0
Contributor ,
Sep 08, 2020

Copy link to clipboard

Copied

But you still didn't post any code for people to help you. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 08, 2020 0
New Here ,
Sep 08, 2020

Copy link to clipboard

Copied

Yes, it was last week I had the code I was working on. Will post when I retrieve it

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 08, 2020 0
Most Valuable Participant ,
Sep 08, 2020

Copy link to clipboard

Copied

You can use this (paid-for) tool I've developed to achieve it, without having to write any code:

http://try67.blogspot.com/2012/09/acrobat-create-dependent-dropdowns.html

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 08, 2020 0
New Here ,
Sep 08, 2020

Copy link to clipboard

Copied

Hello, thank you for your reply.

I am working on these drop down menus as part of my job, so I was hoping to source one via feedback and help from others rather than paying. I wasn't really aware javascript was something you needed to purchase. I hoped to had figured it out myself but couldn't seem to get the code I was using to work. Perhaps I could post the code I was working on and someone may be able to advise where I was going wrong. Thanks for your time.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 08, 2020 0
Contributor ,
Sep 08, 2020

Copy link to clipboard

Copied

"I am working on these drop down menus as part of my job"

So you will get paid for thing we make you, and thats fair for you?

If I spend few hours making code for you and not get paid thats fair for you?

Would you like if your boss tell you you won't get paid for your job?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 08, 2020 0
New Here ,
Sep 08, 2020

Copy link to clipboard

Copied

Seems I have offended you. Apologies for that as that was not my intention.

I was unaware it took hours to create codes, and also wasn't aware people sell codes for purchase either.

I have previously researched and created simple javascript codes that have worked, I just had a little trouble with this one hence why I asked for some help. I am confident I will be able to acheive what I would like to without having to pay so thank you for your offer.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 08, 2020 0
Adobe Community Professional ,
Sep 08, 2020

Copy link to clipboard

Copied

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 08, 2020 0
New Here ,
Sep 08, 2020

Copy link to clipboard

Copied

Hello, thanks for your reply.

I found your sample file interesting in the way it explains dependent lists, and it looks how I would like my form to operate. However, I am still unsure how to implement it into my form.

Thank you for your information.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 08, 2020 0
Engaged ,
Sep 08, 2020

Copy link to clipboard

Copied

Here is working file with codes. Test it and let me know if you need additional help.

PDF 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 08, 2020 1
New Here ,
Sep 09, 2020

Copy link to clipboard

Copied

Thank you 🙂

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 09, 2020 0
New Here ,
Sep 09, 2020

Copy link to clipboard

Copied

Greatful that I have had a kind person help me acheive the result I was after. Thank you all for your help

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 09, 2020 0