[Xerte] Access radio button state
Julian Tenney
Julian.Tenney at nottingham.ac.uk
Mon Jun 14 16:07:32 BST 2010
Try doing getValue() == true
As sometimes the conditionals don't work as you might expect if you
leave out the other item:
If (true){ //you might expect this to work but it sometimes doens't
}
If (true == true){ //do this instead
}
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of rupert rupert
Sent: 14 June 2010 15:36
To: xerte at lists.nottingham.ac.uk
Cc: rupert46 at gmail.com
Subject: [Xerte] Access radio button state
Still getting to grips with the basics of Xerte I'm afraid.
I want to access the state of the radio button group and update an array
when the submit button is pressed. To get the states I am using
something along these lines:
if (!icon.parentNode.parentNode.childNodes[4].getValue()) {
feedback.setText("false");
} else if (icon.parentNode.parentNode.childNodes[4].getValue()) {
feedback.setText("true");
} else {
feedback.setText("error");
}
Which is not working as I expect it to, can anyone guide me towards a
working script.
Many thanks
Rup
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20100614/f4969f44/attachment.html
More information about the Xerte
mailing list