not sure there is an easy way to force focus to stay in a control in JavaScript ... we might investigate this further in the future.you could add this to xxx.vcx!xxxTxt:
procedureinit
wcPropSaveEdit(m.this, 'backColor')returndodefault()procedurevalid(luResult)IF wlWeb()this.backColor = iif(vartype(m.luResult) == 'L' AND NOT m.luResult);
, rgb(255,0,0);
, rgb(255,0,0);
)endif
in your subclasses / instances:
procedurevalidlocal luResult
luResult = <some value>dodefault(m.luResult)return m.luResult
I have this code
If (Type('m.thisForm.wlHTMLgen') == 'L' And m.thisForm.wlHTMLgen)ReturnDoDefault()ElseThis.Value = Left(Upper(This.Value),6)Local lRet
lRet = .T.
.......some controls ontable
.......lRet now is falseReturn lRetEndIf
The problem is that even if the code returns a false value, the textbox is not locked and i can leave it and go to the next object....
Why ?
-- thn (FoxInCloud)