How to use an onChange Script on a Selection list or another field to set a caption of another field?

SOLVED

How can I change the caption of an field in a scree by using onChange of another field or a selection list? I have tried following code but din't work.

if(this.value == 'value1'){
//alert('hahaha');
field_id.Caption = 'value2';
}

Parents Reply Children