Expand my Community achievements bar.

Error execution in IF checkbox is 1 then Numeric Field is 1, else 0

Avatar

Level 1

form1.areaCalc1.Checkbox1::enter - (Javascript, client)

if (this.rawValue = 1){

    xfa.resolveNode("NumericField1[2]").rawValue = 1;

  } else {

  xfa.resolveNode("NumericField1[2]").rawValue =0;

 

I have problem in execution. Check Syntax seems OK. Preview PDF does not alert error. Check Box is grey, Numeric Field white, read only.

When I check the Checkbox the numeric field becomes 1. However the checkbox becomes white and looses the check mark.

When i uncheck the checkbox the numeric field does not change back to 0 or white.

How to solve this javascript? Tx for you help! Hans

2 Replies

Avatar

Former Community Member

Hi, Hans,,,,


'=' which means assigning a value to the field in the if statement..

You must use '==' or '==='.

form1.areaCalc1.Checkbox1::enter - (Javascript, client)

if (this.rawValue == 1){

    xfa.resolveNode("NumericField1[2]").rawValue = 1;

  } else {

  xfa.resolveNode("NumericField1[2]").rawValue =0;

}


S,Candy.

Avatar

Level 1

Verstuurd vanaf mijn iPad

Op 11 aug. 2014 om 04:43 heeft "S,Candy" <forums_noreply@adobe.com> het volgende geschreven:

Error execution in IF checkbox is 1 then Numeric Field is 1, else 0

created by S,Candy in LiveCycle Designer - View the full discussion

Hi, Hans,,,,

'=' which means assigning a value to the field in the if statement..

You must use '==' or '==='.

form1.areaCalc1.Checkbox1::enter - (Javascript, client)

if (this.rawValue == 1){

xfa.resolveNode("NumericField1[2]").rawValue = 1;

} else {

xfa.resolveNode("NumericField1[2]").rawValue =0;

}

S,Candy.

Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at https://forums.adobe.com/message/6628159#6628159

Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:

To unsubscribe from this thread, please visit the message page at . In the Actions box on the right, click the Stop Email Notifications link.

Start a new discussion in LiveCycle Designer by email or at Adobe Community

For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.