[TYPO3-core] RFC: Bug 5789: JS error in new content element wizard with a single item

Oliver Hader oh at inpublica.de
Fri Jun 15 12:49:38 CEST 2007


Hi Wolfgang,

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
> but if you say that's ok and does not apply for this patch, fine +1

I've tested this in FF2, IE7, IE6, Opera 9.21 and Safari/Win 3beta and
could not find any problems after applying the patch.


olly
-- 
Oliver Hader
http://inpublica.de/


More information about the TYPO3-team-core mailing list