Forum Moderators: open
after over two hours of searching in vain I finally solicit help.
On an input field I have an onChange="InputOK(this)" event handler that gets triggered when users move away after changing the contents of the field. InputOK does some tests.
If the test is okay all is well
BUT if the test fails I need to
reset the value to 0 (zero); no issue and
keep the focus on/in this field, actually suppressing/reversing the effect of whatever user action took the focus away.
My "problem" is that I just can't find any clue on how to do keep this field "focused".
Somewhere in my memory is a "setFocus" or the like but all my googling and searching on tutorial sites lead to VB only - and I have to do Javascript.
TIA for any pointer or hint on where to look or how to get it done.