I have a Text Field object at the top of my master page. When the user selects from a drop down object, the Text Field's background color needs to change from white to either green, yellow or red. I created the script in the change event of the drop down and it works correctly until a second page is dynamically created as a result of text the user added to other fields. How do I select all instances of the Text Field?
Here's my script:
Form1.Subform4.Table2.Row1.Overall[0]::change - (JavaScript, client)
if ($.boundItem(xfa.event.newText) == "Green") {
xfa.resolveNode("#pageSet.Page1.OverallTop").border.fill.color.value = "204, 255, 204";//green color
}
if ($.boundItem(xfa.event.newText) == "Red") {
xfa.resolveNode("#pageSet.Page1.OverallTop").border.fill.color.value = "204, 255, 204";//red color
}
if ($.boundItem(xfa.event.newText) == "Yellow") {
xfa.resolveNode("#pageSet.Page1.OverallTop").border.fill.color.value = "255, 255, 0";//yellow color
}
Solved! Go to Solution.
Views
Replies
Total Likes
Hi DKinsley ,
I have had a similar Problem, and solved it this way:
You need to amend the JavaScript code in that way, that you change every instance on every masterpage, where the item is inherited.
In you case the code should look probably like this:
Form1.Subform4.Table2.Row1.Overall[0]::change - (JavaScript, client)
I'm not that good in coding, so perhaps the code still needs to get running, but I hope it Points you to the right direction.
Best
Dietmar
Views
Replies
Total Likes
Hi DKinsley ,
I have had a similar Problem, and solved it this way:
You need to amend the JavaScript code in that way, that you change every instance on every masterpage, where the item is inherited.
In you case the code should look probably like this:
Form1.Subform4.Table2.Row1.Overall[0]::change - (JavaScript, client)
I'm not that good in coding, so perhaps the code still needs to get running, but I hope it Points you to the right direction.
Best
Dietmar
Views
Replies
Total Likes
Thank you!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies