[Proto-Scripty] reply to kuldeep
hi kuldeep, 1) Ajax implimentation of the page 2) one possible guess is they use an observer for the tags. omitting the onclick event. hi everyone, I never understood how facebook left column links eg welcome, newsfeeds and photos, how this things wont open in a new page beside it open #link, do they have any server side check or client side check . and second thing how they open whole page in content div, yes you can do this with javascript but they don't have onclick event on that it just a simple link that also without # how they convert this with # link. It will be great help if you know this and help me out to explain this. Interested in growing your business? Find out how with Yahoo! Search Marketing! Check it out at http://searchmarketing.yahoo.com/en_SG/arp/internetmarketing.php?o=SG0147 -- 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 prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] window.open oncomplete?.. ....
Hi Guys, is there a possible way to check from mother window if I open up a window is ready using window.open? like passing up the value to the mother window. In prototype way. I'll be making an ajax effect like progress bar if the window is not ready yet... Thanks -- 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 prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] facebook leftcol links, how they work?
hi everyone, I never understood how facebook left column links eg welcome, newsfeeds and photos, how this things wont open in a new page beside it open #link, do they have any server side check or client side check . and second thing how they open whole page in content div, yes you can do this with javascript but they don't have onclick event on that it just a simple link that also without # how they convert this with # link. It will be great help if you know this and help me out to explain this. -- 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 prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] Re: Function#defer is not actually what it's description trying to say.
mot, Please submit a patch for the documentation. Thank you! Tobie -- 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 prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] Re: Function#defer is not actually what it's description trying to say.
I can agree with you if the docs say the same as you: "The first call is deferred until the interpreter is next idle." "Next idle" - is the main point here. But they say: "it will run as soon as the interpreter’s call stack is empty." In my example interpreter’s call stack is empty! And the code run not in the way one can expect after *reading docs*. T.J., we both understand that defer do no more then delay(0.01). I think that docs should point out this, nothing more. On Apr 2, 4:34 pm, "T.J. Crowder" wrote: > Hi, > > > a1.defer(1); > > a1(2); > > > Should produce '1' and then '2'. In real live it will produce '2' and > > then '1'. > > No, it should produce "2" then "1" -- exactly as it does. The whole > point of #defer is to defer execution of that call. The first call is > deferred until the interpreter is next idle. It's not idle at that > point (it's in the middle of executing those lines of code) and so it > continues to the next thing it should do, which is to call `al` > directly (not deferred). Why do you think it should be the other way > around? > > -- T.J. > > On Apr 2, 11:30 am, mot <2mat...@gmail.com> wrote: > > > Thank's for theory. > > > Please look at my code example - the main question is about it. > > > Docs say: "Behaves much like window.setTimeout with a delay set to 0". > > But should: "Behaves as window.setTimeout with a delay set to 0.01 > > second". > > > On Apr 1, 11:56 am, "T.J. Crowder" wrote: > > > > Hi, > > > > > I looked at the Function#defer code, and there was nothing about > > > > stack. > > > > The stack in question is in the JavaScript interpreter, not Prototype. > > > In fact, it even says "...the interpreter's call stack." :-) (It's > > > probably more a queue than a stack.) > > > > JavaScript in web browsers is single-threaded. That means that when > > > code is *actively running*, no other code (for instance, scheduled via > > > setTimeout or from an event handler) can run. Requests to run that > > > code queue up in the interpreter until it's idle. That's the effect > > > that Function#defer takes advantage of, by scheduling the code to run > > > via setTimeout after a very brief delay. > > > > HTH, > > > -- > > > T.J. Crowder > > > Independent Software Consultant > > > tj / crowder software / comwww.crowdersoftware.com > > > > On Apr 1, 7:36 am, mot <2mat...@gmail.com> wrote: > > > > > Hello all, > > > > I use prototype library for several years and like it very much. > > > > > The question is about Function#defer. I used it in my work but never > > > > looked under the hood. > > > > The description says: "A “deferred” function will not run immediately; > > > > rather, it will run as soon as the interpreter’s call stack is empty." > > > > > I looked at the Function#defer code, and there was nothing about > > > > stack. All that defer do is delaying function run for 0.01 second. And > > > > there is nothing about such behaviour in the docs. > > > > > According to docs, such code: > > > > function a1(text) { > > > > console.log(text); > > > > > } > > > > > a1.defer(1); > > > > a1(2); > > > > > Should produce '1' and then '2'. In real live it will produce '2' and > > > > then '1'. > > > > > I think API docs should be updated to help developers better > > > > understand what defer really do. -- 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 prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] Re: Function#defer is not actually what it's description trying to say.
On Apr 2, 12:30 pm, mot <2mat...@gmail.com> wrote: > Docs say: "Behaves much like window.setTimeout with a delay set to 0". > But should: "Behaves as window.setTimeout with a delay set to 0.01 > second". That's equivalent in nearly all supported environments: calls to setTimeout with a delay below 10 ms are in fact executed after 10ms anyway. Tobie -- 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 prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] Re: Function#defer is not actually what it's description trying to say.
Hi, > a1.defer(1); > a1(2); > > Should produce '1' and then '2'. In real live it will produce '2' and > then '1'. No, it should produce "2" then "1" -- exactly as it does. The whole point of #defer is to defer execution of that call. The first call is deferred until the interpreter is next idle. It's not idle at that point (it's in the middle of executing those lines of code) and so it continues to the next thing it should do, which is to call `al` directly (not deferred). Why do you think it should be the other way around? -- T.J. On Apr 2, 11:30 am, mot <2mat...@gmail.com> wrote: > Thank's for theory. > > Please look at my code example - the main question is about it. > > Docs say: "Behaves much like window.setTimeout with a delay set to 0". > But should: "Behaves as window.setTimeout with a delay set to 0.01 > second". > > On Apr 1, 11:56 am, "T.J. Crowder" wrote: > > > > > Hi, > > > > I looked at the Function#defer code, and there was nothing about > > > stack. > > > The stack in question is in the JavaScript interpreter, not Prototype. > > In fact, it even says "...the interpreter's call stack." :-) (It's > > probably more a queue than a stack.) > > > JavaScript in web browsers is single-threaded. That means that when > > code is *actively running*, no other code (for instance, scheduled via > > setTimeout or from an event handler) can run. Requests to run that > > code queue up in the interpreter until it's idle. That's the effect > > that Function#defer takes advantage of, by scheduling the code to run > > via setTimeout after a very brief delay. > > > HTH, > > -- > > T.J. Crowder > > Independent Software Consultant > > tj / crowder software / comwww.crowdersoftware.com > > > On Apr 1, 7:36 am, mot <2mat...@gmail.com> wrote: > > > > Hello all, > > > I use prototype library for several years and like it very much. > > > > The question is about Function#defer. I used it in my work but never > > > looked under the hood. > > > The description says: "A “deferred” function will not run immediately; > > > rather, it will run as soon as the interpreter’s call stack is empty." > > > > I looked at the Function#defer code, and there was nothing about > > > stack. All that defer do is delaying function run for 0.01 second. And > > > there is nothing about such behaviour in the docs. > > > > According to docs, such code: > > > function a1(text) { > > > console.log(text); > > > > } > > > > a1.defer(1); > > > a1(2); > > > > Should produce '1' and then '2'. In real live it will produce '2' and > > > then '1'. > > > > I think API docs should be updated to help developers better > > > understand what defer really do. -- 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 prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] Re: Function#defer is not actually what it's description trying to say.
Thank's for theory. Please look at my code example - the main question is about it. Docs say: "Behaves much like window.setTimeout with a delay set to 0". But should: "Behaves as window.setTimeout with a delay set to 0.01 second". On Apr 1, 11:56 am, "T.J. Crowder" wrote: > Hi, > > > I looked at the Function#defer code, and there was nothing about > > stack. > > The stack in question is in the JavaScript interpreter, not Prototype. > In fact, it even says "...the interpreter's call stack." :-) (It's > probably more a queue than a stack.) > > JavaScript in web browsers is single-threaded. That means that when > code is *actively running*, no other code (for instance, scheduled via > setTimeout or from an event handler) can run. Requests to run that > code queue up in the interpreter until it's idle. That's the effect > that Function#defer takes advantage of, by scheduling the code to run > via setTimeout after a very brief delay. > > HTH, > -- > T.J. Crowder > Independent Software Consultant > tj / crowder software / comwww.crowdersoftware.com > > On Apr 1, 7:36 am, mot <2mat...@gmail.com> wrote: > > > Hello all, > > I use prototype library for several years and like it very much. > > > The question is about Function#defer. I used it in my work but never > > looked under the hood. > > The description says: "A “deferred” function will not run immediately; > > rather, it will run as soon as the interpreter’s call stack is empty." > > > I looked at the Function#defer code, and there was nothing about > > stack. All that defer do is delaying function run for 0.01 second. And > > there is nothing about such behaviour in the docs. > > > According to docs, such code: > > function a1(text) { > > console.log(text); > > > } > > > a1.defer(1); > > a1(2); > > > Should produce '1' and then '2'. In real live it will produce '2' and > > then '1'. > > > I think API docs should be updated to help developers better > > understand what defer really do. -- 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 prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
Re: [Proto-Scripty] Using effects after AJAX
hi, you have to handle an extra parameter in your getdata function which should be a callback function to call when ajax request is complete. your getdata should then look like : function getdata(whatdata,whatdiv, callBack) { new Ajax.Updater(whatdiv, someURL, { parameters:whatdata, onComplete: callBack }); } you could then call it that way: getdata(whatdata,whatdiv, function(){ new Effect.Slidedown(whatdiv); }); On Fri, Apr 2, 2010 at 3:21 AM, Barry Smyth wrote: > I have a webpage that loads data into a DIV using the AJAX > getdata(whatdata,whatdiv) function. > > Initially the DIV is hidden and I only want it displayed using the > Effect.Slidedown function once the data has been loaded into the DIV. > > The problem is if I place the Effect.Slidedown function after the > getdata call nothing happens. If I place the effect.slidedown before > the getdata call it works in a way but the box jumps down (I'm > guessing because when its called the size of the DIV isn't correct > height as its having data loaded into it by the getdata call). > > The problem seems to be that the AJAX getdata call somehow changes the > way javascript after the AJAX command works. > > I was wondering if anyone has had a similar problem and if they > managed to find a solution. > > -- > 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 > prototype-scriptaculous+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/prototype-scriptaculous?hl=en. > > -- 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 prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] Using effects after AJAX
I have a webpage that loads data into a DIV using the AJAX getdata(whatdata,whatdiv) function. Initially the DIV is hidden and I only want it displayed using the Effect.Slidedown function once the data has been loaded into the DIV. The problem is if I place the Effect.Slidedown function after the getdata call nothing happens. If I place the effect.slidedown before the getdata call it works in a way but the box jumps down (I'm guessing because when its called the size of the DIV isn't correct height as its having data loaded into it by the getdata call). The problem seems to be that the AJAX getdata call somehow changes the way javascript after the AJAX command works. I was wondering if anyone has had a similar problem and if they managed to find a solution. -- 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 prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.