http://mooshell.net/pmpEB/

Maybe this will help?

(Again, great job with mooshell Piotr!)

On Jul 28, 2009, at 9:19 AM, tswone wrote:


thx- I was hoping I could use delay as opposed to periodical- just can
seem to get delay working the way it seems it should.

great class btw

-T



On Jul 28, 10:36 am, Ryan Florence <[email protected]> wrote:
http://ryanflorence.com/mootools/Utilities/Rp.AutoLogout/

I don't know if it would help, but I've done some similar things at
that link.

On Jul 28, 2009, at 7:33 AM, tswone wrote:



Hi,

I am trying to hack together a session timeout warning (using Aaron's
stickywin...).

Having trouble with the timer being cleared and reset.

As I have it now, the warning appears after 6 secs, when I click on
the 'continue' button (continueSession), the timers are canceled, but
then the next delayed function call never happens.

ShowOverlayWindow shows a stickywin.

Having trouble with the timer being cleared and reset.

var exitSessionMinutes = .5;
                               var warnSessionMinutes = .1;

                               var warnSession = function() {
                                       ShowOverlayWindow
('warnSession');
                               };
                               var exitSession = function() {
window.location = '/ index.php/
logout';
                               };
                               var warnTimer = warnSession.delay
( warnSessionMinutes * 60000 );
                               var exitTimer = exitSession.delay
( exitSessionMinutes * 60000 );

                               var sessionRenew = new Request({
                                       url: 'index.php',
                                       onSuccess: function(r) {
                                               warnTimer =
warnSession.delay( warnSessionMinutes *
60000 );
                                               exitTimer =
exitSession.delay( exitSessionMinutes * 60000 );
                                       }
                               });
document.id('continueSession').addEvent
('click', function(e) {
                                       e.stop();
                                       $clear(warnTimer);
                                       $clear(exitTimer);
                                       sessionRenew.send();
                               });

I must have missed soemthing in mootools docs on delay/$clear, or does
it have something to do stickywin (doubtful)

-Any help is appreciated,

Thanks

T



Reply via email to