maxlength: Firefox vs. IE

I bumped into an issue while testing one of my ColdFusion applications. The issue is how Firefox and IE render HTML. Take the following HTML input tag in test.htm for example:

<input name="field" type="text" value="1234" maxlength="3">

Now, if you view it in Firefox (1.5.0.1) you will only see 123 in the input box. However, if you view it in IE (6.0) you will see 1234. Looks like Firefox truncates the value based on the maxlength attribute, but IE does not.

However, in the example above, both browsers do not allow you to enter a value more than 3 characters in length.

Related articles:


Tagged , , | Comments Closed | Trackbacks Closed