onchange event is NOT working when we use mask on a text field with Input Assistance enable in java server faces (jsf).
Example: Following jsp code sample will illustrate the problem.
Solution:
One possible solution is to use hidden variable which will hold the same value as the phone number field initially.
Any change in the value of phone number field will not affect the hidden field. That means hidden variable will hold the old value. Any difference between the two means the field got changed.
Example:

One possible solution is to use hidden variable which will hold the same value as the phone number field initially.
Any change in the value of phone number field will not affect the hidden field. That means hidden variable will hold the old value. Any difference between the two means the field got changed.
Example:






1 comment:
This works fine.
Post a Comment