Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

How to write Java script for refering the 1st page text field from 2nd page?

Avatar

Level 8
Hello

I am developing an VISITOR info interactive form with webdynpro ABAP, its with 2 pages. Their heirarchy is,
VISITOR_form
    |
    |
    |------Page_1
    |            |
    |            |
    |            |------Text_Field_A_1
    |            |
    |            |------Text_Field_A_2
    |
    |------Page_2
                 |
                 |
                 |------Text_Field_B_1
                 |
                 |------Text_Field_B_2

Now, i have selected the 'Text_Field_B_1' of page_2 and writing the Java script, my requirement is; If Page_1's 'Text_Field_A_2' has a value of "Value_ABCD", THEN the 'Text_Field_B_1' of page_2 should be 'readOnly'. Pls let me know Wht is the Java script for this requirement?
1 Accepted Solution

Avatar

Correct answer by
Level 6

if (xfa.event.newText=="ABCD")
{

VISITOR_form.Page_2.Text_FieldB_1.access ="readOnly";

}

place script on change event of Text_FieldA_2

View solution in original post

1 Reply

Avatar

Correct answer by
Level 6

if (xfa.event.newText=="ABCD")
{

VISITOR_form.Page_2.Text_FieldB_1.access ="readOnly";

}

place script on change event of Text_FieldA_2