This project is archived and is in readonly mode.

#1248 ✓wontfix
John Morris

IE7/IE8 Error grabbing Form element when INPUT element with NAME attribute exists

Reported by John Morris | June 19th, 2011 @ 10:50 AM

I seem to have found an issue with IE7/IE8 when trying to access a FORM element and believe to have verified with jsFiddle.

Using Mootools 1.3.2 core only, if we try to get a FORM element through'formId') AND there is an INPUT element with a NAME attribute declared, IE will throw an error.

This passes in IE9 Standards, Safari, Chrome and Firefox.
This fails in any IE7 or IE8 Standards Mode. The error is "TypeError: Object doesn't support this property or method".

The error seems to be in the Mootools Core 1.3.2 library:

The IE9 Developer Tools Console gives us this information:

SCRIPT438: Object doesn't support this property or method
mootools-core-1.3.2.js, line 368 character 30

Comments and changes to this ticket

  • Arian

    Arian June 19th, 2011 @ 11:49 AM

    • State changed from “new” to “wontfix”

    It's because in IE8 or lower each element will be extended by because lte IE8 doesn't support Element.prototype. Because of that, it will try to do something like myElement.send = someFunction(). If this already exists, because of that ugly forms thing where the inputs are on the form object (with the input names as key) it apparently cannot overwrite that property because it is read-only.

    Unfortunately there isn't a quick fix for this, we could check if the property exists, but that would slow down a lot of the other stuff and would cause that your send method won't work anymore too.

    This is not something of just 1.3, but even occurs in MooTools 1.1. In MooTools 2 it is/will be fixed though because of another architecture.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket