Expand my Community achievements bar.

SOLVED

Difference btwn xfa.event.change and xfa.event.newText pls?

Avatar

Level 8

Hello

I tried to figure out the difference between xfa.event.change and xfa.event.newText in google, but did not see any such!

Pls. could you clariy my question that what is the differenvce between these 2 (xfa.event.change and xfa.event.newText)?

Thank you

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

checkboxes do not generate a change value, so you need another way to prevent it to bechecked if any other field is empty.

One way would be this script in the click:event of your checkbox.

if (xfa.resolveNode("myFomr.Page2.mySubform21.BankNumber").isNull) {

          this.rawValue = "0";

}

View solution in original post

5 Replies

Avatar

Level 10

Hi,

xfa.event.change is the vaue of a singe keystroke or a paste from the clipboard.

When you type "Hello" than change occurs five times and is "H" then "e" then "l" then "l" and finally "o".

When you paste it from the clipboard it's just "Hello".

xfa.event.newText is the value of the field after you changed its value.

A full description can be found in the XFA specs at page 400.

http://partners.adobe.com/public/developer/en/xml/xfa_spec_3_3.pdf

Avatar

Level 8

Thank you. With out having much knowledge on JS, i wrote the below JS

myFomr.Page2.mySubform21.myCheckBox211::exit - (JavaScript, client)

My impression was, i can change a value (in the above case am unchecking the check box by populating it with ""/space) of any (text, check box, drop-down) field on the form explicitly by using this script

i already placed in around 20 locations, so, pls. suggest me do i need to correct all these 20 locations, kind of risk/tediuos at this point or is it ok that leave as is?

Thank you

Avatar

Correct answer by
Level 10

Hi,

checkboxes do not generate a change value, so you need another way to prevent it to bechecked if any other field is empty.

One way would be this script in the click:event of your checkbox.

if (xfa.resolveNode("myFomr.Page2.mySubform21.BankNumber").isNull) {

          this.rawValue = "0";

}

Avatar

Level 2

Hi Radzmar, my name is Steve. Niall is out of town this week and said maybe you could help me with a solution.

I have a PDF form I designed in livecycle and it connects to a SQL datbase. It works great but need it to populate some fields on the form and I just can't get it. I am using some script from a help file

but Iam a novice here..Can you help?