My checkbox is named Ucheck. The image is named UStamp. I need the checkbox to turn the image visible.
I've read the other forum answers and have found this example:
var showHide = event.target.isBoxChecked(0)?display.visible:display.hidden;
this.getField("Text036").display = showHide;
However, when I the above script in to my form (changinging the (getField to "Ustamp") on LiveCycle, it gives me this answer
Script failed(language is formcalc;context is
xfa[0].form[0].U-check[0].#subform[0].Ucheck[0]
script=var showHide=
event.target.isBoxChecked[0]?display.visible:display.hidden;
this.getField("Ustamp").display=showHide
Error: syntax error near token "?" on line 1, column 44.
When I take the "?" out, it says it doesn't like something else about the script.
I know NOTHING about Javascript, so haven't a clue how to debug this. I do program in Access, but am not real familar with VB either.
Thank you for your help.....
Solved! Go to Solution.
Views
Replies
Total Likes
Did you save the form as dynamic .....under the file saveAs dialog make sure that you pick a Dynamic PDF as the type.
Paul
Views
Replies
Total Likes
The example you found is using AcroForm javascript. The script to do this would be placed on the change event of the checkbox:
if (this.rawValue == 1){
UStamp.presence = "visible"
} else {
UStamp.presence = "hidden"
}
This assumes that you have set you On value as 1 and your Off value as 0.
Paul
Views
Replies
Total Likes
Yes, values are 1 and 0 respectively...
I entered this in the Javascript box
U-Check.#subform[0].Ucheck::change - (FormCalc, client)
if
(this.rawValue == 1){
UStamp.presence
= "visible"
}
else {
UStamp.presence
= "hidden"
}
What I get now is
Script failed (language is formcalc; context is
xfa[0].form[0].U-Check[0].#subform[0].Ucheck[0]
script=if (this.rawValue==1){
UStamp.presence="visible"
}else{
UStamp.presence="hidden"
}
Error: syntax error near token "{" on line 1, column 24.
I tried taking out the "{"'s and it really doesn't like that either...
Views
Replies
Total Likes
That is Javascript and you have the script set for FormCalc .....In teh Script editor on the right side is the language preference .....change that from Form
Calc to Javascript.
paul
Views
Replies
Total Likes
Okay.... I saw that and changed it just now, but now it doesn't give me an error message, it just doesn't do anything...
Boy I hate being ignorant...
Jan L. Sons
Engineering Tech
Marathon Oil Co.
Cody Office
307.587.2059
Views
Replies
Total Likes
Did you save the form as dynamic .....under the file saveAs dialog make sure that you pick a Dynamic PDF as the type.
Paul
Views
Replies
Total Likes
You are WONDERFUL.... thank you so much.
If you need some help with Access... just whistle...
Jan L. Sons
Engineering Tech
Marathon Oil Co.
Cody Office
307.587.2059
Views
Replies
Total Likes
Neophite goofs:
Didn't change window on left from Formcalc to Javascript
Didn't know about saving as a Dynamic Form.
After correcting both of these, I am now in business...
thank you so very much...
Bless You...
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies