Thom,
Saw where someone wanted the ability to "deselect radio buttons." Here's a little ditty that you may find useful...
Given: Two radio buttons named rad, which of course form a group. One for "Yes," and the other for "No." We'll nickname them rad-Yes and rad-No.
On the 1st button (rad-Yes), set the actions as follows:
Mouse Down:
this.getField("rad").OldValue = this.getField("rad").value;
MouseUp:
if (this.getField("rad").OldValue == "Yes") {
this.getField("rad").value = "Off";
}
On the 2nd button (rad-No), set the actions as:
Mouse Down:
this.getField("rad").OldValue = this.getField("rad").value;
Mouse Up:
if (this.getField("rad").OldValue == "No") {
this.getField("rad").value = "Off";
}
This takes advantage of the fact you can arbitrarily create properties on objects, and then forms a toggle for each radio button.
Enjoy!
-- Terrill --
(PS: Seems the sat-still-lite (satellite) is acting up today. If you've seen this twice... it's because things died last submission!)
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script