Advanced onDataChange to a field

Hi all :)

I want to call a method every time there is a change made to a text field in a web client and that to without loosing focus of that field :idea: did not find onDataChange method help full as it was calling my desird method after losing the focus on the field.
I went through the scheduler plugin and actually trying if it could help. :?

In the mean time it would be Great :!: if some one could suggest me any other solution to that…

Have you tried to return false in the onDataChange? Then the user cannot leave the field.

Maybe you can explain a little more about what you’re trying to achieve, then people can help better.

In Foxpro we have the event ‘InteractiveChange’ on a form field which fires every time the data in the field is changed (through keyboard or mouse) without having to move to another field.

To my knowledge this event does not exist in Servoy, onDataChange is only fired at focus change in text fields.

Regards,

Mr. lwjwillemsen you got my point… :)

lwjwillemsen:
In Foxpro we have the event ‘InteractiveChange’ on a form field which fires every time the data in the field is changed (through keyboard or mouse) without having to move to another field.

To my knowledge this event does not exist in Servoy, onDataChange is only fired at focus change in text fields

Actually I was testing a functionality in web client… like for instance I am entering a password in a password field and want to instantly call a method each time I entered/deleted a character in the field to check and display its Strength. I used the scheduler plugin but in vain may be I didn’t do well on that…

tysonj:
Hi all :)

I want to call a method every time there is a change made to a text field and that to without loosing focus of that field :idea: did not find onDataChange method help full as it was calling my desird method after losing the focus on the field.
I went through the scheduler plugin and actually trying if it could help. :?

In the mean time it would be Great :!: if some one could suggest me any other solution to that…

tysonj, we had a similar problem and used the keyListener plugin to get around it.
Set the listener on the field/s and you’re done :)

Cheers,
Maria

Hi maria… thnx for the reply… :)
well I was testing on web client and have come through the keyListener plugin but could not suceed… could u just help me out how this plugin can be used in web client to meet my purpose of advanced onDataChange.

Due to the nature of the Web Client, where the UI runs in the browser, but the logic runs on the Server, an implementation of a keyListener/interactiveChange event is not likely to be very successful, as it means a roundtrip to the server and back from the browser on each keypress, which, with the latency of the connection between the browser and the server, will most likely cause a degraded user experience.

Depending on the requirements you might consider including and executing some clientside (so in the browser) javascript, but you’d have to consider security and cross browser javascript differences.

Paul