0

I am very much new to this!.I am running some javascript in adobe PDF files and I am trying to trigger a message in a text box based on whether a check box is checked or not.

var checkbox = getField("OK").value;
If (checkbox == True);{
event.value = " Check Box is Checked   ";
}
Else {
 event.Value = " check box not checked";
}

Could anyone please help.

5
  • Possible duplicate of Get checkbox status using javascript? Commented Apr 20, 2017 at 8:53
  • You need the checked status of checkbox, not value. Commented Apr 20, 2017 at 8:53
  • @Troyer Who said anything about jQuery? Commented Apr 20, 2017 at 8:54
  • Your example is not valid JavaScript. The conditional keywords must be in lowercase. Commented Apr 20, 2017 at 8:59
  • 3
    JavaScript is case sensitive. It should be if, else, true, and value all in lowercase. Also, remove the ; before the first {. Commented Apr 20, 2017 at 8:59

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.