Hi to all,
I appreciate if someone writes down the java script code for preventing the user to type ‘<’, ‘>’, ‘"’,’:’ in a webtextfield… or any equivalent in xojo code?
Also, preventing the copy function from a htmlviewer (maybe by not allowing highlighting text, or left mouse click and press shift)?
but have trouble to convert it despite the fact that I have substitute with ascii 60,62,34,72
I think that problem is that I want just these particular characters and not to restrict all numbers or letters.
After that I decide to leave this post for getting it right.
Thanks Michel, i appreciate your support!
I am aware of || and == but somehow I had trouble to make the code of the first post to work…
I thought that ascii table was universal regardless OS…
Keycodes are not the same as ascii. They overlap for numbers and letters (lowercase only, no uppercase) but keycodes represent the keys on the keyboard, not the character they produce. There are keycodes for the shift key, etc.
If I got a bit of time, I will get back to that. Indeed keycode will restrict the entire key, upper and lowercase. I will see if it is possible to get the character instead.
Thanks Michel so much, this is the right code!
Was so simple…
I will take a 48hours course for JavaScript next month, just for doing these simple things
Also, I’m thinking about a similar course in Python.
Regards
MB