Hi I have a textbox then if a user inputs a string on the box then it detects special characters it change them to something else.... does anybody have a script for that
Use the following function to replace the characters. Populate the arrays arReplace and arReplaceWith with the required characters. var arReplace = new Array('a', 'b', 'c', 'd', 'e'); var arReplaceWith = new Array('A', 'B', 'C', 'D', 'E'); function replace(str){ len = arReplace.length; for(i = 0; i < len; i++){ str = eval('str.replace(/' + arReplace[i] + '/g, arReplaceWith[i] )'); } return str; } Code (markup):