Expand my Community achievements bar.

SOLVED

problem with if statement

Avatar

Level 2

I havre problem with this code . it is showing error illigical use of else statement. i checked the syntax it is corrct. but i didn't get where my problems is

i have a drop drop list box . if user selects items textfields  named txt_contract1 & txt_contract2 values has to change.iam new to java script. is it any way to programmetically edit from vb.net. iam familier with that.

dataroot.Transmittal_pdf.DropDownList1::click - (JavaScript, client)

if

(xfa.event.newText == "Strategic"){

xfa.form.dataroot._Transmittal_pdf.

dataroot._Transmittal_pdf.Table5.Row2.txt_contract1.value

= "Strategic Roads Master Plan";

dataroot._Transmittal_pdf.Table5.Row2.txt_contract2.value

= "Projects-Immediate Schems";

}

else

{

dataroot._Transmittal_pdf.Table5.Row2.txt_contract1.value

= "Retained Consultancy Projects";

dataroot._Transmittal_pdf.Table5.Row2.txt_contract2.value

= "";

}

1 Accepted Solution

Avatar

Correct answer by
Level 9

Hi Prasad,

In the rawValue the "v" should be capital "V" instead of small "v". So it should be rawValue instead of rawvalue.

Thanks,

Bibhu.

View solution in original post

3 Replies

Avatar

Level 9

Hi Prasad,

Instead of using dataroot._Transmittal_pdf.Table5.Row2.txt_contract1.value use dataroot._Transmittal_pdf.Table5.Row2.txt_contract1.rawValue.

Thanks,

Bibhu.

Avatar

Level 2

Iam newbie to java script. iam trying to build a live cycle desiner form with validations . so i created a simple code to change the values in text boxes based the selection in the dropdown combo box.

dataroot.Transmittal_pdf.DropDownList1::change - (JavaScript, client)

if

(xfa.event.newText == "Strategic"){

dataroot.Transmittal_pdf.Table5.Row2.txt_contract1.rawvalue

= "Strategic Roads Master Plan";

dataroot.Transmittal_pdf.Table5.Row3.txt_contract2.rawvalue

= "Projects-Immediate Schems";

}

else {

dataroot.Transmittal_pdf.Table5.Row2.txt_contract1.rawvalue= "Retained Consultancy Projects";

dataroot.Transmittal_pdf.Table5.Row3.txt_contract2.rawvalue= "";

}

My dropdownlist1 has only two values "Strategic" and "RCS" and two textboxes i kept in row2 and row5 of table 5 .my subform name "Transmittal_pdf". Everything is corect. there is no syntax problem. is there any feature is there in javascript to check step by step execution of code while running one in visual basic toggle breakpoint

Avatar

Correct answer by
Level 9

Hi Prasad,

In the rawValue the "v" should be capital "V" instead of small "v". So it should be rawValue instead of rawvalue.

Thanks,

Bibhu.