Hi All:
I have a form in which there are two radio buttons, one for yes and one for no. When the user clicks the yes button, "Yes" shows up in a text box nearby, and when the user clicks no, the words "Fraud Risk" show up in a different text box.
This is controlled by code that looks like this:
getField("Text1").display = display.hidden;
getField("Text1a").display = display.hidden;
if(event.target.value == 'Yes')
getField("Text1").display = display.visible;
else if(event.target.value == 'Fraud Risk')
getField("Text1a").display = display.visible;
If, in the text field Options dialog box, I make the default value "yes" or "fraud risk", then the process works fine, but when I click my Reset Form button, the radio buttons clear, but the text box that most recently had text visible remains.
If, in the text field Options dialog box, I leave the default value blank, clicking the radio buttons does not cause the words to appear in the text box. The border will show, but not the words.
What am I missing?
Thanks,
Amy Wheeler
Another issue with reset is that it causes all the calculations to run, so this is another area where extra code is necessary to make sure the calculations act appropiately on reset.
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]
Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script