Re: [Proto-Scripty] chain findall each

2010-09-17 Thread Johan Arensman
findAll is your filter function. The result from findAll can be iterated using each but I think we really need more information such as a datastructure to actually help you with your problem. Greets, Johan On Fri, Sep 17, 2010 at 6:15 AM, kstubs kst...@gmail.com wrote: How do you chain

[Proto-Scripty] Re: chain findall each

2010-09-17 Thread T.J. Crowder
Hi, `findAll` is for searching through Enumerables -- e.g., Array-like things. Unless the JSON object you're talking about is an Array, it's not going to help you. Looping through all of the properties in an object is trivial, though: var name, value; for (name in obj) { value =

[Proto-Scripty] Returning an array of results from an operation on an array.

2010-09-17 Thread Richard Quadling
Hi. How do I do something like this (just an example) ... [1,2,3].each(function(val){return val * val;}); such that the result is ... [1,4,9] It seems each() is returning the original value and not the calculation. The full code is ... $$('#cbGridContainer

Re: [Proto-Scripty] Returning an array of results from an operation on an array.

2010-09-17 Thread Jarkko Laine
On 17.9.2010, at 15.03, Richard Quadling wrote: Hi. How do I do something like this (just an example) ... [1,2,3].each(function(val){return val * val;}); such that the result is ... [1,4,9] [1,2,3].map(function(i){ return i * i }); //

Re: [Proto-Scripty] Returning an array of results from an operation on an array.

2010-09-17 Thread Richard Quadling
On 17 September 2010 13:26, Jarkko Laine jar...@jlaine.net wrote: On 17.9.2010, at 15.03, Richard Quadling wrote: Hi. How do I do something like this (just an example) ... [1,2,3].each(function(val){return val * val;}); such that the result is ... [1,4,9] [1,2,3].map(function(i){

[Proto-Scripty] Re: Chrome 5 refused to get unsafe header xjson

2010-09-17 Thread nigeke...@googlemail.com
I think I'm being caught out by the SOP. My app is a phonegap app and so it's domain is the client machine so to speak. When I try to talk to the server from the client Chrome enforces the SOP. The status of the transport object is 0 in Chrome debugger. I'm looking at jsonp solutions. My

Re: [Proto-Scripty] Looking for a way to disable buttons, inputs while images load

2010-09-17 Thread Walter Lee Davis
Off the top of my head, I would say observe clicks on a temporary element placed over the top of the page and cause them to die, rather than trying to disable clicks where you are. By the time your clicks bubble from the element they were made on up to the outer shell, it's already too

Re: [Proto-Scripty] Looking for a way to disable buttons, inputs while images load

2010-09-17 Thread Jane Hunter
Thanks very much, Walter. I'm inclined to try your approach, but I have a couple of questions that,if you could answer them, will help me understand it better. First, what is the difference between observe...evt.stop() and stopObserving? And why would a new div catch the clicks, when

Re: [Proto-Scripty] Looking for a way to disable buttons, inputs while images load

2010-09-17 Thread Jane Hunter
Thanks, but that won't work. Everything I make is in divs,but I can't hide these divs or there'd be little to show on the page. On Fri, Sep 17, 2010 at 2:48 PM, Phil Petree phil.pet...@gmail.com wrote: place the buttons in a div and show/hide the div On Fri, Sep 17, 2010 at 2:26 PM, Jane

Re: [Proto-Scripty] Looking for a way to disable buttons, inputs while images load

2010-09-17 Thread Walter Lee Davis
Answers inline below... On Sep 17, 2010, at 3:37 PM, Jane Hunter wrote: Thanks very much, Walter. I'm inclined to try your approach, but I have a couple of questions that,if you could answer them, will help me understand it better. First, what is the difference between

Re: [Proto-Scripty] Looking for a way to disable buttons, inputs while images load

2010-09-17 Thread Jane Hunter
Thank you so much! This is very helpful. I hate using code that I don't understand. I'm bemused that I never understood z-index's behavior in bubbling, but glad that I now do! On Fri, Sep 17, 2010 at 4:24 PM, Walter Lee Davis wa...@wdstudio.comwrote: Answers inline below... On Sep 17, 2010,

Re: [Proto-Scripty] Looking for a way to disable buttons, inputs while images load

2010-09-17 Thread Walter Lee Davis
IE doesn't understand position:fixed. thats where i would start looking. if (Prototype.BrowserIE){ cover.setStyle('position:absolute'); //do something here to make cover the same height as the entire page } walter On Sep 17, 2010, at 6:40 PM, Jane Hunter wrote: Walter, Again my