HighDots Forums  

Re: Yahoo UI-Library und =?UTF-8?B?enVyw7xja2dlZ2ViZW5lcw==?= XML-Objekt

Javascript (German) Programmiersprache JavaScript. (de.comp.lang.javascript)


Discuss Re: Yahoo UI-Library und =?UTF-8?B?enVyw7xja2dlZ2ViZW5lcw==?= XML-Objekt in the Javascript (German) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Thomas 'PointedEars' Lahn
 
Posts: n/a

Default Re: Yahoo UI-Library und =?UTF-8?B?enVyw7xja2dlZ2ViZW5lcw==?= XML-Objekt - 03-22-2006 , 11:37 AM






Martin Honnen wrote:

Quote:
Konni Scheller wrote:
Ich durchsuche das zurückgegebene Objekt, das XML ist:
var tlist = xml.getElementsByTagName('blockquote');

In Firefox hat tlist den Typ object.
In Safari hat tlist danach den Typ: function (!)

Versuche einfach, über die NodeList zu iterieren:
for (var i = 0, l = tlist.length; i < l; i++) {
Und sofern die Reihenfolge keine Rolle spielt, ist

for (var i = tlist.length; i-- {

effizienter.

Quote:
var element = tlist[i];
}
Das wird schon klappen, so eine DOM-Methode wie getElementsByTagName
unterstützt wird.

Man sollte sich nicht durch die Resultate verwirren lassen, die typeof
für Hostobjekte liefert, IE z.b. gibt für
typeof document.getElementById
auch
object
zurück, obwohl 'function' passender wäre.
ACK, siehe dazu auch news:1369854.0BuayQThzf (AT) PointedEars (DOT) de


PointedEars


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.