PDA

View Full Version : TextField maxlength attribute



lechuck
11 Aug 2007, 11:12 AM
I have a function to replace all input text to textFields. The function work ok, but when I put the attribute maxlength, in FF2 it work fine, but in IE the maxlength value is different of the original.

var fieldtexts = $$('input#quantity');
fieldtexts.each(function(e){
var ft = new Ext.form.TextField({
name: e.name,
width:40,
height:25,
allowBlank:false,
value:'1',
grow:false,
maxLength:4,
minLength:1,
cls:'p5'
})
ft.applyTo(e);
ft.getEl().dom.setAttribute('maxlength', '4');
});

FF2 maxlength is 4. Thats ok
IE7 maxlength is 2147483647