Hi there. I want to make two buttons invisible when the saved pdf is open. If either one checkbox is found to be selected, one of the two corresponding buttons will be visible. Apparently, my scripts failed to do so.
topmostSubform::docReady - (JavaScript, client)
if ((Page8.CheckBox1[0].rawValue == "0") && (Page8.CheckBox1[1].rawValue == "0")) {
this.resolveNode("Page8.Button1").presence = "invisible";
this.resolveNode("Page8.Button1[1]").presence = "invisible";
}
if (Page8.CheckBox1[0].rawValue == "1") {
this.resolveNode("Page8.Button1").presence = "visible";
this.resolveNode("Page8.Button1[1]").presence = "invisible";
}
if (Page8.CheckBox1[1].rawValue == "1") {
this.resolveNode("Page8.Button1[1]").presence = "visible";
this.resolveNode("Page8.Button1").presence = "invisible";
}
Can anyone please advise? Thanks.
I'm a little rusty on my JavaScript, but don't you want to confirm if the checkbox value is true or false:
bInitialValue (optional): If true, the initial state of the checkbox is checked. Default is false.
bAfterValue : When the alert method exits, contains the state of the checkbox when the dialog closed. If true, the checkbox was checked when the alert box is closed.
Kelly McCathran
Adobe Certified Instructor
Adobe User Group Manager (http://creativesuitelovers.com)
Certified Technical Trainer+