Hallo Peter Oliver Geller, handleLoad = function(success){ if (success){ displayLoaded(); }else{ displayError(); } }; ist ein Funktionsliteral, das in einer Variablen gespeichert wird. Wie alle Variablen, muß man diese Variable auch vorher festlegen, damit sie zur Verfügung steht. Andreas [Zitat vom Donnerstag, 16. Oktober 2003 um 19:30] POG> Hallo, POG> ich habe da nochmal eine verständnis Frage zur Codeausführung. POG> Bei einem zuladenden XML Object z.B. wird hier die handleLoad Funktion POG> nicht ausgeführt.... außer ich setze handleLoad = function.. nach oben POG> Document = new XML(); POG> Document.ignoreWhite = true; POG> Document.onLoad = handleLoad; POG> Document.load("news.xml"); POG> handleLoad = function(success){ POG> if (success){ POG> displayLoaded(); POG> }else{ POG> displayError(); POG> } POG> } POG> schreibe ich das ganze allerdings so wird die Funktion ausgeführt obwohl POG> sie nach dem Document.load kommt.... POG> Document = new XML(); POG> Document.ignoreWhite = true; POG> Document.onLoad = handleLoad; POG> Document.load("news.xml"); POG> function handleLoad(success){ POG> if (success){ POG> displayLoaded(); POG> }else{ POG> displayError(); POG> } POG> } POG> Warum war das so nochmal???? POG> Danke POG> Peter [/Zitat] ------------------------------------------------------ Archiv : //www.freelists.org/archives/ascoders/ Optionen : //www.freelists.org/list/ascoders ------------------------------------------------------