You need to use val() as you are looking for the value attribute of the input not the html.
var len = content.val().length On May 28, 9:47 am, vladv <[EMAIL PROTECTED]> wrote: > Hello, > Have some strange behavior with Firefox, can someone please help me > with this? > > This is the code (without irrelevant info): > > var content = $('#TextField'); //this is ASP.NET TextField > var len = content.html().length; //same result with text() > > if(len == 0) > { > return false;} > > else > { > return true; > > } > > It works great in IE (6 and 7) but in Firefox gives me always len==0 > (even if there is some text there) > > I use jQuery 1.2.6