Dan_Mason Posted September 9, 2009 Share Posted September 9, 2009 Okay, so this is the code i have so far (as an example): <script language="javascript" type="text/javascript"> function removeSpaces(string) { return string.split(' ').join(''); } </script> <form> <input type="text" onblur="this.value=removeSpaces(this.value);"> <input type="button" value="Click"> </form> As you can see, I am automatically removing spaces in the field. Now I know it would be obvious to most people but the majority of people using the login system I am designing are going to be pretty computer illiterate, So i need it to be obvious. I want to also have a warning pop-up box If spaces are found and removed saying "Spaces cannot be used in Usernames, spaces have been removed." Can anyone help? Thanks in advance Link to comment https://forums.phpfreaks.com/topic/173654-warning-user-not-to-enter-spaces-in-username-field/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.