Hello
I have page1 and page3 in my_form. Page1 has field with caption 'COUNTRY', Page3 also has the same field (Caption is COUNTRY's NAME), and BINDed with same data source, and the NAME is same in BINDING tab, in both fields NAME is UR_COUNTRY in BINDING tab, fine.
Requirement is to make it grey out (at 2 locations, its Page 1 and Page 3) and ReadOnly as well, so, i am wring the below Java Script in my_form's docReady event
my_form.Page1.Address.COUNTRY.access = "readOnly"
xfa.resolveNode("my_form.Page1.Address.COUNTRY.ui.#textEdit.border.fill.color").value = "192,192,192";
Its greying out in Page1's COUNTRY field, but NOT greyinh out the Page'3 COUNTRY's NAME field!! not sure why?
Pls. let me know How can i do it WITH OUT code redenncy (code redenency is not accepting against standards here)? I do not want to repeate the code again in Page3's COUNTRY's NAME field initialization event
Thank you
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
In your script you are only referencing the object on Page1. If you also want to change the appearance of the object on Page3, then you will need to duplicate the lines and reference that object specifically.
Also, you can make the fill color script a bit leaner/generic:
COUNTRY.ui.oneOfChild.border.fill.color.value = "192,192,192";
Hope that helps,
Niall
Views
Replies
Total Likes
Did you try placing the second line of code in the same DocReady event?
my_form.Page3.Address.COUNTRY.access = "readOnly"
xfa.resolveNode("my_form.Page1.Address.COUNTRY.ui.#textEdit.border.fi ll.color").value = "192,192,192";
Thanks
Srini
Thank you.
All (2 lines) the code am placing in docReady event of my_form , i mean, at FORM level/Top level
Not working!
Any thoughts?
Views
Replies
Total Likes
Hi,
In your script you are only referencing the object on Page1. If you also want to change the appearance of the object on Page3, then you will need to duplicate the lines and reference that object specifically.
Also, you can make the fill color script a bit leaner/generic:
COUNTRY.ui.oneOfChild.border.fill.color.value = "192,192,192";
Hope that helps,
Niall
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies