Force text input to uppercase


/ Published in: ActionScript 3
Save to your folder(s)



Copy this code and paste it in your HTML
  1. /* Use this function to be dispatch from an Event.CHANGE on a textfield */
  2.  
  3. private function _handleChangeText ($evt:Event):void {
  4.  
  5. var $curInput:String = evt.target.text;
  6. evt.target.text = $curInput.toLocaleUpperCase();
  7.  
  8. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.