It would be useful if you said what the `json` variable references.
You're treating whatever it is like an array, so I'll assume that here
-- or at least, that it has a `length` property and properties with
the names `0`, `1`, etc.

So you're saying

1. It does show "testing header==true" at least once.
2. It does not show "testing continuing flow".
3. It does not show "testing header==false".

I can't immediately think of any form that `json` would take that
would exhibit the behavior you're describing, particularly not #1
combined with #2. Have you edited that code snippet by any chance? For
instance, replaced some other output mechanism with `alert`? If so,
I'd have a good hard look at the output mechanism you replaced.

T.J. Crowder
Independent Software Consultant
tj / crowder software / com

On Apr 14, 2:51 pm, chrysanthe m <chrysant...@gmail.com> wrote:
> Hello
> I am perplexed with what I believe is an error the code snippet below only
> prints out
> "testing header==true" for iterations that have a header==true in the
> returned json object.
> Now the oddity.
> 1.  It does not printout "testing continuing flow" anytime
> 2.  It does not printout "testing header==false" for iterations that have a
> header==true in the returned json object
>          for(i=0;i<json.length;i++){
>           if(json[i].header==true){
>           alert("testing header==true.");
>           }  //10413  end of only header==true
>           alert("testing continuing flow.");
>           if(json[i].header==false){
>             alert("testing header==false.");
>           }
>         }

You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to