cancel
Showing results for 
Search instead for 
Did you mean: 

How to refer the 1st page's 2nd text field from the 2nd page in Java scrip?

former_member202077
Participant
0 Kudos

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?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Script is

if ( Page_1.Text_Field_A_2.rawValue == "Value_ABCD" )

{

Text_Field_B_1.access = "readOnly";

}

It can be written at the form:ready event of Text_Field_B_1.

Thanks,

Aravind

Answers (0)