inputEx - UpperCaseField Usage
Basic UpperCaseField creation
Use the following code to create a basic inputEx UpperCaseField.
var field = new inputEx.UpperCaseField({parentEl: 'container1', value: 'i was lowercase'}); var el = YAHOO.util.Dom.get('container1'); var button1 = inputEx.cn('button', null, null, "SetValue with 'InputEx'"); var val = 'InputEx'; el.appendChild(button1); YAHOO.util.Event.addListener(button1, "click" ,function() { field.setValue(val); val = (val == 'InputEx') ? '' : 'InputEx'; button1.innerHTML = "SetValue with '"+val+"'"; }); var logDiv = inputEx.cn('div', null, null, "Log :"); el.appendChild(logDiv); field.updatedEvt.subscribe(function(e,params) { var value = params[0]; logDiv.innerHTML += "Updated at "+(new Date())+" with value "+value; logDiv.appendChild(inputEx.cn('br')); });