New Forum | Previous | Next | (P-PDF) Developers
Topic: radio button puzzler
Conf: (P-PDF) Developers, Msg: 33691
Date: 1/28/2002 04:37 PM
here's a question that, superficially, seems like a cake-walk to answer. but in real life it's causing me mucho grief.
suppose we have an option group consisting of three radio buttons ['yes','no','maybe']. let's construct a field to describe this group:
var oReply = getField("Reply")
now suppose we'd like to learn, programmatically, on which button our cursor is RESTING (or focused). This is not to be confused with the VALUE of the option group which is ALWAYS the value of the selected button no matter on which button the cursor is resting.
we know that we can now get the array, above described, with:
var aReply = oReply.exportValues
and if we wanted to get a UNIQUE export value of aReply we can get it with:
aReply; aReply; and aReply (for 'yes'; 'no'; and 'maybe', respectively)
at this point it'd be great if there were a radio button PROPERTY (say, 'rButtonFocus') that could tell me the focus/export value of the button i'm on so that i could test aReply for same. then i could use something like:
var bTest = oReply.rButtonFocus == aReply
but noooo! this is maddening.
the js object help file on page 280 implies the export value can be obtained with 'setFocus() (a METHOD.) mebbe it's me but i just can't see how 'setFocus()' helps with this puzzler.
Can you set me straight?