cartereverett
asked on
I need an Acrobat JavaScript to manage a combo box, check box and text field.
Hello Experts,
Excuse my question title; I couldn't find a better way to describe what I need.
I have a PDF document with a Combo Box, a Check box and a text field. On the Combo Box I have the following:
$250,000/$250,000
$500,000/$500,000
$250,000/$500,000
$1,000,000/$1,000,000
$1,000,000/$2,000,000
$2,000,000/$2,000,000
$2,000,000/$3,000,000
$3,000,000/$4,000,000
$4,000,000/$4,000,000
$5,000,000/$5,000,000
If a user select any of the amounts from the combo box and do not check the check box, the text field will be empty.
If $250,000/$250,000 is selected and the check box is checked, the text field has to show "N/A"
If $500,000/$500,000 is selected and the check box is checked, the text field has to show "$500,000"
If $250,000/$500,000 is selected and the check box is checked, the text field has to show "$500,000"
If $1,000,000/$1,000,000 is selected and the check box is checked, the text field has to show "$1,000,000"
The text field has to show $1,000,000 for all the other amounts where there are selected from the combo box and the check box is checked.
Need help ASAP. Thanks in advance for your help.
sample.pdf
Excuse my question title; I couldn't find a better way to describe what I need.
I have a PDF document with a Combo Box, a Check box and a text field. On the Combo Box I have the following:
$250,000/$250,000
$500,000/$500,000
$250,000/$500,000
$1,000,000/$1,000,000
$1,000,000/$2,000,000
$2,000,000/$2,000,000
$2,000,000/$3,000,000
$3,000,000/$4,000,000
$4,000,000/$4,000,000
$5,000,000/$5,000,000
If a user select any of the amounts from the combo box and do not check the check box, the text field will be empty.
If $250,000/$250,000 is selected and the check box is checked, the text field has to show "N/A"
If $500,000/$500,000 is selected and the check box is checked, the text field has to show "$500,000"
If $250,000/$500,000 is selected and the check box is checked, the text field has to show "$500,000"
If $1,000,000/$1,000,000 is selected and the check box is checked, the text field has to show "$1,000,000"
The text field has to show $1,000,000 for all the other amounts where there are selected from the combo box and the check box is checked.
Need help ASAP. Thanks in advance for your help.
sample.pdf
How much do you know about JavaScript?
ASKER
Almost nothing. I took some VB .net classes and have the logic, but that's about it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
One more thing, remove the line with "console.println(comboValu e)" from the script above, that was a line to output debug information to the JavaScript console (which you can bring up with Ctrl-J) in Acrobat.
ASKER
khkremer,
Please check the attach file and tell me what I'm doing wrong. I corrected the info within the combo box and added the 0 for the export value of the first option of the combo box and did everything else you asked me to and it doesn't do anything. Thanks buddy.
sample.pdf
Please check the attach file and tell me what I'm doing wrong. I corrected the info within the combo box and added the 0 for the export value of the first option of the combo box and did everything else you asked me to and it doesn't do anything. Thanks buddy.
sample.pdf
The combo box name in your form contains a space, when you reference that name in the document level javascript, you are using the name without the space, therefore the program cannot find the field. Either remove the space from the actual field name, or add the space to the reference in the program.
ASKER
I was about to reply letting you know that I found the problem. Thanks a whole lot for your help. I might have some more stuff soon :)