Link to home
Start Free TrialLog in
Avatar of scgproductions
scgproductions

asked on

Restricting Turkish Characters in Forms

I have my Javascript to retrict special characters & Turkish characters.  When I save my file using Dreamweaver the Ğğ become Gg and the Şş become Ss which then sees the normal letters like GgSs as special characters.  How do I restrict the Turkish characters from my form?

var etcVal   = ' ~`!@#$%%^&*()-_=+\|[{]};:\'\",<.>/?&#286;&#287;Üü&#350;&#351;Çç';

function Specialcheck(value) {    
   var blankCount=0;
   var Speccount=0;
         
   for ( var i = 0 ; i < value.length ; i++ ){
      if ( value.substring( i, i+1 ) == " "  ) {        
         blankCount = blankCount + 1;  
         
      }
         for(j=0;j<etcVal.length;j++){
           if(value.substring( i, i+1 )  == etcVal.charAt(j)) {
               Speccount = Speccount + 1;
           }            
          }
   }    
   
      if(blankCount > 0 || Speccount > 0){
         return true;        
      }else{
         return false;    
      }
}

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of callrs
callrs

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