[TYPO3-core] RFC: Bug 5789: JS error in new content element wizard with a single item
Martin Kutschker
martin.kutschker-n0spam at no5pam-blackbox.net
Fri Jun 15 16:59:43 CEST 2007
Wolfgang Klinger schrieb:
> *hiya!*
>
> Oliver Hader wrote:
>> Problem:
>> On using the new content element wizard that has just a single item
>> (e.g. only content type "text"), a JavaScript error occurs after
>> clicking on that item: "document.editForm.tempB[0] has no properties"
>>
>> Solution:
>> "document.editForm.tempB" is not an array if only a single item exists.
>> The solution with the least effort is to use a function that returns an
>> array: document.getElementsByName('tempB')
>
> getElementsByName has some problems in Internet Explorer:
> http://www.quirksmode.org/dom/w3c_core.html
> http://www.quirksmode.org/dom/tests/named.html
No problem because the patch involves an input tag. To quote your source:
"Explorer Windows and Opera only look at input and img, elements that
traditionally have a name attribute, and also add an element with
id="MapNode"."
Masi
More information about the TYPO3-team-core
mailing list