Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!ecngs!feeder2.ecngs.de!212.27.60.7.MISMATCH!feeder1-1.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <1506321.WIFe3XHvss@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Wed, 26 Jun 2013 02:39:27 +0200 User-Agent: KNode/4.10.4 Content-Transfer-Encoding: 8Bit X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. <2529079.e95EOKG17B@PointedEars.de> MIME-Version: 1.0 Lines: 36 NNTP-Posting-Date: 26 Jun 2013 02:39:28 CEST NNTP-Posting-Host: 5d2ab748.newsspool4.arcor-online.net X-Trace: DXC=RVR^Ddi1d=4nBOkdL^Lo7>4IUK]gf>Kc3``coVM82 X-Complaints-To: usenet-abuse@arcor.de Xref: csiph.com comp.lang.javascript:20448 Thomas 'PointedEars' Lahn wrote: > The reason of the error is most likely not that there is a “fieldset” > element, but that there are several controls that have the same name. For > example, it is common to put a radiobutton group into a “fieldset” > element. All radiobuttons of a group must have the same name to be > dependent on one another. > > In that case, > > elements[i] > > refers to a NodeList of references to those controls. But that probably does not apply here. It applies when you access controls by name instead of by index. > An object implementing the NodeList interface does not have a “type” > property. As the property does not exist, accessing it results in > “undefined”, and “undefined” has no properties. > > You can use the fact above to your advantage to find out whether there is > a group of same-named controls that need to be processed differently: > > var control = elements[i]; > if (typeof control.type == "undefined") > { But the second part of the explanation should apply and this approach should work regardless. -- PointedEars Twitter: @PointedEars2 Please do not Cc: me. / Bitte keine Kopien per E-Mail.