[jQuery] Re: PeriodicalExecutor or $.executeEach

2007-05-09 Thread Емил Иванов / Emil Ivanov
Actually, you are right. After some searching I found a nice Scheduler plugin. http://trainofthoughts.org/blog/2007/02/15/jquery-plugin-scheduler/ And download: http://trainofthoughts.org/repo/getfile?f=jquery/jquery.schedule.js On 08/05/07, Gilles (Webunity) [EMAIL PROTECTED] wrote:

[jQuery] Re: PeriodicalExecutor or $.executeEach

2007-05-08 Thread Emil Ivanov
Currently I'm kinda busy, and the executeEach method is working for me... When I have more time I might try it, but not right now, also I will help as much as I can. I think it's not much of writing, but designing, as JS can get nasty with closures and 'this'. Regards, Emil Ivanov Stosh

[jQuery] Re: PeriodicalExecutor or $.executeEach

2007-05-08 Thread Gilles (Webunity)
Actually there is allready something called periodical update plugin, you can check that out if you wish..

[jQuery] Re: PeriodicalExecutor or $.executeEach

2007-05-07 Thread Dan G. Switzer, II
Emil, // jQuery plugin for periodical execution. // Pass the function the seconds and the function and it will call the function every N seconds, // use this.stop() to stop the execution. jQuery.executeEach = function (seconds, fn) { var scope = { stop: function () {

[jQuery] Re: PeriodicalExecutor or $.executeEach

2007-05-07 Thread Stosh
On May 7, 9:19 am, Dan G. Switzer, II [EMAIL PROTECTED] wrote: Also, you might consider renaming the plug-in. The name executeEach doesn't make it clear that it executes a function on a set interval. This is an interesting thought... it may be profitable to expand this idea a bit and develop

[jQuery] Re: PeriodicalExecutor or $.executeEach

2007-05-07 Thread Emil Ivanov
Dan G. Switzer, II написа: Emil, I'm not sure the stop() method as-is actually works. The stop method should be: stop: function () { clearInterval(this.timer); }, Yes, I have forgotten it and it after some debugging and it took me a while to figure out why it wasn't stopping.

[jQuery] Re: PeriodicalExecutor or $.executeEach

2007-05-07 Thread Stosh
On May 7, 5:05 pm, Emil Ivanov [EMAIL PROTECTED] wrote: Also Stosh, about the query plug-in idea - can you share what exactly you have in mind.. Emil, For example Being able to stack AJAX calls into a queue, so that they are either spaced out or simply don't occur at the same time would

[jQuery] Re: PeriodicalExecutor or $.executeEach

2007-05-07 Thread Stosh
On May 7, 5:05 pm, Emil Ivanov [EMAIL PROTECTED] wrote: Also Stosh, about the query plug-in idea - can you share what exactly you have in mind.. Emil, For example Being able to stack AJAX calls into a queue, so that they are either spaced out or simply don't occur at the same time would

[jQuery] Re: PeriodicalExecutor or $.executeEach

2007-05-07 Thread Dan G. Switzer, II
Emil, I know the name isn't the best, but it was the first that came to my mind and it was short. Any ideas would be appreciated. Maybe these ideas suck, but here they are: execInterval() execTimer() timer() repeatInterval() execRepeat() Somebody else might be able to come up with a better

[jQuery] Re: PeriodicalExecutor or $.executeEach

2007-05-07 Thread Emil Ivanov
Stosh написа: On May 7, 5:05 pm, Emil Ivanov [EMAIL PROTECTED] wrote: Emil, For example Being able to stack AJAX calls into a queue, so that they are either spaced out or simply don't occur at the same time would be handy. In some respects the end-functionality would simulate a

[jQuery] Re: PeriodicalExecutor or $.executeEach

2007-05-07 Thread Stosh
On May 7, 5:56 pm, Emil Ivanov [EMAIL PROTECTED] wrote: Actually, today I ran into a problem where ajax request overlapped and caused strange issues, and I actually tried to find a way to make it work. What i tried is adding a flag to the scope (running: false) and checking in the called