Never use for (... in ...) on non literal objects ( == {})

:)

Why are you still using 1.11? hehe

Can you pastie (http://pastie.org/) your code? This isn't exactly the
best place for that. :-\

On Mar 6, 2:57 am, electronbender <[email protected]> wrote:
> No, using mootools only (it's 1.11).
> I know that .each is working since this particular .each is wrapped in
> another .each, which is working...
>
> On Mar 4, 6:24 pm, Thierry bela nanga <[email protected]> wrote:
>
> > I think each might have been overriden,
> > are you using another library (jQuery, etc ...) ?
>
> > On Wed, Mar 4, 2009 at 6:18 PM, keif <[email protected]> wrote:
>
> > > Do you have the full code?
>
> > > I'd be interested in seeing what it'd say if you did:
> > > jel.data.each(function(jop){
> > >   alert(this);//or console.log in firebug to compare
> > >  alert(jop);//or console.log in firebug to compare
> > >   new Element('option',{'value':jop.frval}).appendText
> > > (jop.frname).injectInside(frmel);
>
> > > })
>
> > > On Mar 3, 1:20 pm, electronbender <[email protected]> wrote:
> > > > So i replaced that code with this:
> > > >                                                                 var x;
> > > >                                                                 for (x 
> > > > in
> > > jel.data){
>
> > > new Element('option',{'value':jel.data[x].frval}).appendText
> > > > (jel.data[x].frname).injectInside(frmel);
> > > >                                                                 }
>
> > > > And it works... But why does the .each method not work here?
>
> > > > On Mar 3, 7:15 pm, electronbender <[email protected]> wrote:
>
> > > > > I have this function:
> > > > > jel.data.each(function(jop){
> > > > >   new Element('option',{'value':jop.frval}).appendText
> > > > > (jop.frname).injectInside(frmel);
>
> > > > > })
>
> > > > > Works fine in FF, but IE says that jop is undefined, and the error i
> > > > > get is that jop.frval is null or not an object.
> > > > > However, if i debug using Visual Studio, and add a watch to jel.data
> > > > > you can clearly see that there are 15 elements in the array.
> > > > > So why is this not working in IE?
>
> > --
> > fax : (+33) 08 26 51 94 51

Reply via email to