Expand my Community achievements bar.

please help opening pdf file from dropdown or listbox

Avatar

Former Community Member
Have looked through most of the forums, don't think i missed the answer but here goes

I have a form that includes 4 dropdown catagories; i am trying to have it so that when the friendly text is select from the dropdown it opens a new pdf file with the requested info.

New to designer, in the past i would rely on bookmarks, so what can i do



Thanks
2 Replies

Avatar

Former Community Member
craig_michael_ryan@adobeforums.com wrote:

> Have looked through most of the forums, don't think i missed the answer but here goes

> I have a form that includes 4 dropdown catagories; i am trying to have it so that when the friendly text is select from the dropdown it opens a new pdf file with the requested info.

> New to designer, in the past i would rely on bookmarks, so what can i do

>

> Thanks



Here's a detailed explanation:



- Create a dropdown list with your 4 categories as the text values

- Go to the binding tab and check the checkbox that says "Specify Item

Values". You will see your four categories and they each will have been

assigned a number (0, 1, 2, 3). Change these number values to be the

URL to the PDF that you want each category to be associated with.

- Add a 'change' event to your dropdown list. Select Javascript as the

scripting language. Put the following code in your change event:



var selectedText = xfa.event.newText;

var redirectURL = this.boundItem(selectedText);

xfa.host.gotoURL(redirectURL);



Hope this helps!



Justin Klei

Cardinal Solutions Group

www.cardinalsolutions.com

Avatar

Former Community Member
thank you i'm nearly there.

copied the code in under "change" event as java,

var selectedText = xfa.event.newText;

var redirectURL = this.boundItem(selectedText);

xfa.host.gotoURL(redirectURL); ?nothing changed?



value in dropdown (example) for item 1 = C:\Documents and Settings\Craig Ryan\Desktop\FILE SYSTEM\CPG Paperwork\Design Masters\Standard Range\Doubles\ballina\drop-in options\BALCONY to rear.pdf ...BALCONY to rear.pdf being the file I want to open.

save form .. open in acrobat.. select friendly text in dropdown..Security Warning pops up asking ..Allow or Block..select allow, Nothing happens, at this point I should be seeing a file.



Again thank you for you help