Link to home
Start Free TrialLog in
Avatar of Jaber Ahmad
Jaber AhmadFlag for Côte d'Ivoire

asked on

BlockSpecialChar on mobile

Hi !
I try to block special characters on my registration form but this code only works on desktop,
Do you have a solution to adapt it so that it takes the mobiles and the desktop please?
onkeypress='return blockSpecialChar(event,this); return false;'

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of lenamtl
lenamtl
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jaber Ahmad

ASKER

Thanks for your help.

I have also corrected the function and everything is in order now.
function blockSpecialChar(e){var t;return = ((k > 64 && k < 91) || (k > 96 && k < 123) || k == 8 || k == 32  || (k >= 48 && k <= 57))};

Thank you so much !