Old 11-13-2007   #1 (permalink)
Registered User
 
Join Date: Sep 2007
Posts: 5

Exclamation How to find that how long window is not accessed

Hi,
I want to know is there any way with which I can find how long the window is not accessed. I want to redirect to log in screen on exceeding some access time.
shinde_vishvana is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-16-2007   #2 (permalink)
Be Unique. Be Heard.
 
Jacorre's Avatar
 
Join Date: Jul 2006
Location: USA
Posts: 468

You could use the following in the head section of your webpage:

Code:
<meta http-equiv="refresh" content="N; URL=other-web-address">
This would do a redirect to another page (defined by URL) within a certain number of seconds (defined by N). But this method is also used alot by spam sites so not sure if it's the best method.
__________________

Jacorre Studios Blog
Jacorre is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-16-2007   #3 (permalink)
Rusty Bio-Hazard!
 
notjustgraphics's Avatar
 
Join Date: Sep 2006
Location: Toronto, Ontario, Canada
Posts: 1,026

Send a message via MSN to notjustgraphics
Meta Refresh is a pretty good way to defeat your chances in search engines, but despite the perps who use it for mischievous purposes, it does have legitimate uses.

Cheers.

Mike.
__________________
notjustgraphics is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-17-2007   #4 (permalink)
Registered User
 
Join Date: Aug 2004
Posts: 105

This is sort of the reverse of what you asked but will function the same basically. Rather than counting how long a window is open it counts down from a specific time interval.

Copy and paste this into the body of your page.


Code:
<script language="JavaScript" type="text/javascript">

   //Set the time to wait in seconds
   var countDownInterval=5;
			
			
   var countDownTime=countDownInterval+1;
   function countDown(){
      countDownTime--;
      if (countDownTime <=0){
      countDownTime=countDownInterval;
      clearTimeout(counter)
				
      //Set the page to go to
      window.location = 'page2.htm'
      return
   }

   if (document.all) //if IE 4+
   document.all.countDownText.innerText = countDownTime+" ";
   else if (document.getElementById) //else if NS6+
   document.getElementById("countDownText").innerHTML=countDownTime+" "
   else if (document.layers){ 
			
      //CHANGE TEXT BELOW TO YOUR OWN
      document.c_reload.document.c_reload2.document.write('Redirect in <strong id="countDownText">'+countDownTime+' </strong> seconds')
      document.c_reload.document.c_reload2.document.close()
   }
   counter=setTimeout("countDown()", 1000);
   }
   function startit(){
      if (document.all||document.getElementById) 
			
      //CHANGE TEXT BELOW TO YOUR OWN
      document.write('Redirect in <strong id="countDownText">'+countDownTime+' </strong> seconds')
      countDown()
   }
   if (document.all||document.getElementById)
   startit()
   else
   window.onload=startit
</script>
Jolt is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Been a long long time :) Metecra Introductions 7 03-15-2007 04:53 AM
Question Re: Shelly Long ddor Adobe Photoshop 8 03-07-2007 07:17 PM
man ohhh man kinda long? maybe ecntrc General Discussions 7 06-19-2006 12:11 AM
Manging Brush Libraries cilee Adobe Photoshop 14 02-08-2006 03:36 AM
Help to find charecters ngz General Discussions 4 10-14-2004 07:07 PM


All times are GMT +1. The time now is 04:40 AM.
Content Relevant URLs by vBSEO 3.2.0 RC7

Design & Content © BioRUST 2007 :: PRIVACY STATEMENT :: LEGAL INFORMATION :: ADVERTISING MEDIA KIT