Textbox/check box linking help needed.
Hi,
I'm new to Javascript and am trying to learn as I go but I was hoping someone could help me out with some script and implementation tips for the following scenario:
As part of a form, I have four text boxes and a check box. If the user enters anything into any one of the text boxes I want the check box to automatically be ticked. If the user unticks the check box, I want the four textboxes to be cleared.
So far I have got the checkbox ticking automatically by adding the below custom calculation script to the text boxes (name altered for simplicity sake).
if (event.value=="")
{this.getField("textbox1").value="Off"}
else
{this.getField(textbox1").value="Yes"}
This code causes an issue though, in that because there is text in the textbox, I cannot untick the checkbox.
Can anyone offer any help please? Thanks in advance.
G.
