Expand my Community achievements bar.

Problems Scripting a NumericField event...

Avatar

Level 2
Hello,



I do have a problem scripting an event for my numericField - I want the numericField to hide another object if the user enters 0 in the numeric field. Unfortunately this script does not work correctly - and I do not know why and need assistance (if you can also tell me how to hide more than one object without subpages that would be wonderful, too...)



My non working script:

Formular1.superframe.administrator.NumerischesFeld4::change - (JavaScript, client)

if (this.rawValue=="0")

{

xfa.form.Formular1.superframe.administrator.compdistribdetail.presence = "invisible"

}

else

{

xfa.form.Formular1.superframe.administrator.compdistribdetail.presence = "visible"

}
2 Replies

Avatar

Former Community Member
Hi Soenke,

Your script must work on the exit event of the field, not in the change event. And also it would be better to make comparison on numeric fields without quotation marks. this.rawValue == 0 is better.

In further assistance and consultancy, do not hesitate to contact me.



asiyegunaydin@kgc.com.tr

Asiye

Avatar

Level 2
Thanks a lot - you were a great help !!!

And thanks for the offered further assistance as well...



Soenke