newbie to javascript. I have a form with many checkboxes that need to be 4-cycle (Yes, No, Not Applicable, Blank) rather than 2 cycle so I went with a text box rather than a check box.
Using a button and a text box, clicking the button cycles through all 4 values, placing them in the text box whose font is set to Wingdings2. I would rather use just the text box and a Mouse Up action but I don't know how to write that code.
This is what works for the button/text box combo:
var t = this.getField("TextTest").value;
switch(t) {
case "":
this.getField("TextTest").value = "P";
break;
case "P":
this.getField("TextTest").value = "O";
break;
case "O":
this.getField("TextTest").value = "X";
break;
case "X":
this.getField("TextTest").value = "";
}
How can I do this with just the text box? I would appreciate any help on this. Also please let me know if I am setting myself up for future headaches doing it this way.
Thanks
Shaun