These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Problems with list not retaining value during Toggle

LDROSE
Registered: Mar 7 2009
Posts: 3

I have a very simple form with aradio button group - Number , Alphabet
and 2 drop down list having 2 values in each
If Number chosen - List 1 with values (1, 2) displays
If Alphabet chose - List2 with values (A,B) displays Both are overlayed to save space.
On the Radio button click event I have -
form1.#subform[0].Rlist.Number::click - Num.presence = "visible"; Alphabet.presence = "invisible";
form1.#subform[0].Rlist.Alpha::click - Num.presence = "invisible";Alphabet.presence = "visible";
When I toggle, the values in the list are not synchronised. Both lists have the 1st value set to default in the Object - Value - Default. Eg: I chose Number, The list with number displays and I took '1' . I click radio button Alphabet, I see List for Alphabets the Value selected is 'A'
So far fine. I change list value to 'B' and switch Radio to Number expecting to see '2', instead I see the previous value '1'. Is there any additional coding I need to do?
Please help me....

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
You need to reset the list value at the time that you change the presense.
EX. Num.rawValue = 1;

There is another way to do this. You could reload the list entries in one drop down, instead of toggling between two drop-downs. It's explained in this article.

http://www.acrobatusers.com/tutorials/2007/js_list_combo_livecycle/

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script