Use the following code to create a basic inputEx EmailField.
1 | var field = new inputEx.EmailField({parentEl: 'container1', showMsg: true }); |
2 | |
3 | var logDiv = inputEx.cn('div', null, null, "Log :"); |
4 | YAHOO.util.Dom.get('container1').appendChild(logDiv); |
5 | field.updatedEvt.subscribe(function(e,params) { |
6 | var val = params[0]; |
7 | logDiv.innerHTML += "Updated at "+(new Date())+" with value: "+val; |
8 | logDiv.appendChild(inputEx.cn('br')); |
9 | }); |
view plain | print | ? |
Use the following code to create a basic inputEx EmailField (with MX correction)
1 | var field = new inputEx.EmailField({parentEl: 'container2', showMsg:true, fixdomain:true, description:"Try abc@gmail.co, abc@yaoo.fr..." }); |
2 | |
3 | var logDiv = inputEx.cn('div', null, null, "Log :"); |
4 | YAHOO.util.Dom.get('container2').appendChild(logDiv); |
5 | field.updatedEvt.subscribe(function(e,params) { |
6 | var val = params[0]; |
7 | logDiv.innerHTML += "Updated at "+(new Date())+" with value: "+val; |
8 | logDiv.appendChild(inputEx.cn('br')); |
9 | }); |
view plain | print | ? |