Limiting Field Length
Posted: Tue Oct 06, 2009 3:26 pm
I am looking for a solution to this issue. I can limit an input field to a determined length but this also changes a part of the behavior.
This works fine until I use it while editing and existing field contents. When this field contents is full and hilighted then you must press the BACKSPACE KEY or the DELETE KEY to change the contents.
If the field is not full then the behavior is normal and any key will erase the existing contents.
Is there a way to make it behave the same even if the field length is full?
Code: Select all
on keydown
if the length of me >= 6 then focus me
else pass keydown
end keydown
If the field is not full then the behavior is normal and any key will erase the existing contents.
Is there a way to make it behave the same even if the field length is full?