Archive

Posts Tagged ‘Textfield Listener’

Making the first letter in a textfield Uppercase

March 19th, 2008 No comments
  1. var myKeyListener = new Object();
  2. myKeyListener.onKeyUp = function() {
  3. var myString = myTextfield.text;
  4. var firstLetter = (myString.charAt(0)).toUpperCase();
  5. var remainderLetters = (myString.substring(1)).toLowerCase();
  6. var myNewString = firstLetter+remainderLetters;
  7. myTextfield.text = myNewString;
  8. };
  9. Key.addListener(myKeyListener);

Textfield Listener

February 14th, 2008 No comments
  1. //construct the listener object
  2. myListenerObject = new Object();
  3.  
  4. myListenerObject.onChanged = function(txt) {
  5. //perform this when textfield value has changed
  6. execute();
  7. }
  8.  
  9. //call the TextField.addListener method to register the object
  10. Textfield.addListener(myListenerObject);
SEO Powered by Platinum SEO from Techblissonline