Limit input to Webtextfield without roundtrip to Server?

When using the KeyPressed or LostFocus event handler of a WebTextField, then I guess it will make a roundtrip to the server?

Is there a less costly way to limit input to a WebTextField of Type Number to values > 0 And <= 100 ?

There could be a way in JavaScript, but it is not quite simple. Xojo needs to get all keystrokes and won’t see the content of the field if it is modified by JS.

But if I may ask, why are you so concerned about a single textfield data entry control traffic ? At most, we are talking about a dozen or so of keystrokes a second, admitting the user keeps compulsively punching keys…