alex: "for in" schleife wirkungslos in firefox?

Beitrag lesen

wie gesagt, ich bau das objekt in einer klasse zusammen und nutze dazu mootools.

du definierst es selbst, da klappt alles wunderbar.

bei mir klappt es auch wenn ich anstelle von obj einfach

for ( x in { ... } ) schreibe.

aber bei mir sieht es so aus:

__CODE__

var Market = new Class( {

initialize: function( url, type, options ) {

this.setOptions(options);
        this.Type  = type;
        this.Items = {};

this.parseXML( url, type );
        this.injectMarket( type );
    },

injectMarket: function( type ) {

var market = "[size=20]" + type + "[/size]\n";

for ( var x in this.Items ) {

market += "\n" + this.Items[x]["count"] + "x [item:" + x + "]";
        }

alert( market );
    }
} );

__CODE__

das parseXML baut das Objekt und unter IE kommt das alert vollständig, aber firefox spuckt nix aus.

alex