Thread: Validation
View Single Post
  #2  
Old 09-02-2005, 12:51 PM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default

This works, if you need help implementing it, let me know.

Code:
<head> <script language="javascript"> <!-- Begin function ignoreChar(string) { var temp = ""; string = '' + string; //-------------------------------------------- //--- Change the character within the quotes //--- to whatever character you want excluded. splitstring = string.split("'"); //-------------------------------------------- for(i = 0; i < splitstring.length; i++) temp += splitstring[i]; return temp; } // End --> </script> </head> <body> <center> Exclude apostrophes from a text field.</p> <form> <input type=text size=25 onKeyup="this.value=ignoreChar(this.value);"> <input type=text size=25 onKeyup="this.value=ignoreChar(this.value);"> <input type=text size=25 onKeyup="this.value=ignoreChar(this.value);"> </form> </center> </body>
__________________
xcartmods.co.uk
Reply With Quote