NetTalk Central

Author Topic: Is there any way to display login screen on timeout automatically  (Read 4671 times)

alex.kolaric

  • Full Member
  • ***
  • Posts: 151
  • Do it or do not, there is no try
    • View Profile
    • Email
Hi,

Is there any way to display login screen on timeout automatically on client side, even when user doesn't click on some page control. Basically what I need is to show login form in client browser as soon as timeout occurs.

thanks,
Alex

random69

  • Newbie
  • *
  • Posts: 24
    • View Profile
    • Email
Re: Is there any way to display login screen on timeout automatically
« Reply #1 on: February 02, 2009, 04:38:22 PM »
Hi Alex, I do that now using javascript and a timer. When it expires, it forces the location to the login page. Also shows the countdown in a span on all my pages when logged in.

Do a search for "countdown javascript".

alex.kolaric

  • Full Member
  • ***
  • Posts: 151
  • Do it or do not, there is no try
    • View Profile
    • Email
Re: Is there any way to display login screen on timeout automatically
« Reply #2 on: February 02, 2009, 11:38:34 PM »
Hi,

thanks for the tip.

cheers,
Alex

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Is there any way to display login screen on timeout automatically
« Reply #3 on: February 03, 2009, 06:19:18 AM »
Hi, I´ve been searching one but I cant find one that redirects to another page.
May you please post yours?
Thanks
Alberto
-----------
Regards
Alberto

Johan de Klerk

  • Full Member
  • ***
  • Posts: 217
  • Johan de Klerk
    • View Profile
    • Designer Software
Re: Is there any way to display login screen on timeout automatically
« Reply #4 on: February 04, 2009, 05:04:29 AM »
Hi Alberto,

Since you first posted this I thought it would be a great idea to let the user know when the system will automatically log him out if he does not keep on working.

Below is the script that I found and then modified to work for me.
I use this one once the user has logged in and another one if he is not logged in.

I hope this helps you.

Regards

Johan de Klerk

<form name="counter">
    <p align="center">
    <input type="text" size="82" name="d2" style="font-weight: bold; border: 3px solid #FF0000; color:#FF0000; background-color:#FFFF00; text-align:center">
</form>
<script>
<!--
var seconds=60
var minutes = 1
document.counter.d2.value="If you do not work you will automatically be logged out in "+minutes+" minutes and "+seconds+" seconds."
function display(){
if (seconds<=0){
    seconds=60
    minutes-=1
}
if (minutes<0){
    seconds=0
    minutes=0
    window.open('http://www.dynamicdrive.com/forums/showthread.php?t=6138','_top');
}
else
    seconds-=1
    document.counter.d2.value="If you do not work you will automatically be logged out in "+minutes+" minutes and "+seconds+" seconds."
    setTimeout("display()",1000)
}
display()
-->
</script>
Clarion 10, NT 11.57