On Tue, Jun 23, 2009 at 11:28 AM, Valentino
Lun<[email protected]> wrote:
>
> Dear all
>
> I want my rails web application include a timeout function using
> prototype..
>
> say, if the browser is idle for 15 mins, then it automatically redirect
> to the admin/logout, where admin is my controller name, logout is the
> method name.
>
> I have google around and could not find the solution... Sorry for this
> easy question, but I have really no idea of it.
>
> Please hint me on this...million thanks.
>
> Many thanks
> Valentino
> --
You can use setTimeout to execute a function after a period,
<script type="text/javascript">
setTimeout(1000*60*15, function(){ document.location = '<your url>'; });
</script>
Andrew Timberlake
http://ramblingsonrails.com
http://MyMvelope.com - The SIMPLE way to manage your savings
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---