Planet PDF Forum Planet PDF Forum
  New Posts New Posts RSS Feed - Dropdown Boxes and Export Values - I am lost
  FAQ FAQ  Forum Search   Register Register  Login Login

Hi, welcome to the Foxit Planet PDF Forum. If you have PDF or Adobe Acrobat questions then the right place to ask them is here, in this forum.

Dropdown Boxes and Export Values - I am lost

 Post Reply Post Reply
Author
alayton View Drop Down
New Member
New Member
Avatar

Joined: 19 Sep 2014
Location: USA
Points: 5
Post Options Post Options   Quote alayton Quote  Post ReplyReply Direct Link To This Post Topic: Dropdown Boxes and Export Values - I am lost
    Posted: 23 Sep 2014 at 4:31am
Greetings:

So, I am way too old not to grasp this but...

I presume that the 'Item' and the 'Export Value' are in essence paired values, meaning that I should easily be able to get and set the export value much as I do the value. For example: this.getField("DropdownBox.1").value gives me the UI visible string of the currently selected item. Similarly, I would expect something like this.getField("DropdownBox.1").Exportvalue to allow me to get the item's export value.

I fully understand that such a question only stresses my being a novice but I truly need some help here in the most simplest of ways to accomplish this.

I am doing this inside a function that is called from the dropdown  box's 'Custom keystroke script'.

Thank you for any help you can offer.

Regards,

Andy
Back to Top
aandi View Drop Down
Senior Member
Senior Member


Joined: 07 Jul 2011
Points: 18358
Post Options Post Options   Quote aandi Quote  Post ReplyReply Direct Link To This Post Posted: 23 Sep 2014 at 11:39am
Don't presume anything; assumptions are the mother of all programming errors. What you need to know should be in the JavaScript API Reference.

Clearly, combo boxes do have export values and display values. The questions therefore have to be (a) does JavaScript offer me access to both sets of values (b) which of these is the "value", the normal thing to be worked with (c) how do we get hold of the "other".

Well, which is the value? The answer is "it depends" (and I'm not sure without careful reading). In some kinds of event, the value is the "face value", while in other events it is the "export value". Field.value and Event.value may not be the same; read the description of Event.value.

A combo box is populated using Field.setItems, which allows you to set, for each item, its regular value and export value. The documentation for that gives other methods which can, by searching, be used to go from one to the other. 
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.10
Copyright ©2001-2017 Web Wiz Ltd.

This page was generated in 0.031 seconds.