[web2py] Re: Capture the system shut down and browser close event

2012-02-28 Thread Massimo Di Pierro
you need do use websockets (gluon/contrib/comet_messaging.py) On Feb 28, 4:55 am, Sanjeet Kumar sanjeet@gmail.com wrote: I am going to develop the time sheet app so for that i captured the login and logout event through this :- auth.settings.login_onaccept = lambda form: lgin(form)

[web2py] Re: Capture the system shut down and browser close event

2012-02-28 Thread Alan Etkin
For checking if the server is up from the client browser (without refreshing the page) you can use jQuery .ajax() and a simple function at the controller to return the server state. I have submitted a LOAD helper enhancement to perform a ajax loop at the client side. It could be used for this

[web2py] Re: Capture the system shut down and browser close event

2012-02-28 Thread Wikus van de Merwe
You could simply assume x minutes (eg. 15) without any user action equals to logout. Then all you need is just a small script that runs periodically by cron and does a DB update when inactivity is detected.

Re: [web2py] Re: Capture the system shut down and browser close event

2012-02-28 Thread Sanjeet Kumar
Alan can you explain in detail On Tue, Feb 28, 2012 at 7:58 PM, Alan Etkin spame...@gmail.com wrote: For checking if the server is up from the client browser (without refreshing the page) you can use jQuery .ajax() and a simple function at the controller to return the server state. I have

Re: [web2py] Re: Capture the system shut down and browser close event

2012-02-28 Thread Sanjeet Kumar
Massimo how can i use this On Tue, Feb 28, 2012 at 7:41 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: you need do use websockets (gluon/contrib/comet_messaging.py) On Feb 28, 4:55 am, Sanjeet Kumar sanjeet@gmail.com wrote: I am going to develop the time sheet app so for that