inputEx - UpperCaseField Usage

Basic UpperCaseField creation

Use the following code to create a basic inputEx UpperCaseField.

Log :
1var field = new inputEx.UpperCaseField({parentEl: 'container1', value: 'i was lowercase'}); 
2 
3var el = YAHOO.util.Dom.get('container1'); 
4 
5var button1 = inputEx.cn('button'nullnull"SetValue with 'InputEx'"); 
6var val = 'InputEx'
7el.appendChild(button1); 
8YAHOO.util.Event.addListener(button1, "click" ,function() { 
9   field.setValue(val); 
10   val = (val == 'InputEx') ? '' : 'InputEx'
11   button1.innerHTML = "SetValue with '"+val+"'"
12}); 
13 
14var logDiv = inputEx.cn('div'nullnull"Log :"); 
15el.appendChild(logDiv); 
16field.updatedEvt.subscribe(function(e,params) { 
17    var value = params[0]; 
18    logDiv.innerHTML += "Updated at "+(new Date())+" with value "+value; 
19    logDiv.appendChild(inputEx.cn('br')); 
20}); 
view plain | print | ?