Problems Scripting a NumericField event...

Avatar

Avatar

Niederfuchs

Avatar

Niederfuchs

Niederfuchs

25-08-2008

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"

}

Replies

Avatar

26-08-2008

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

Avatar

Niederfuchs

Avatar

Niederfuchs

Niederfuchs

26-08-2008

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

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



Soenke