[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now



Posted on 2004-11-13
Medium Priority
Last Modified: 2013-12-24

i have a login page for students .After the students login, their details such as UId,FNAMe,LNAME  and login time are entered into the database .After logging out their logout time is updated in the database(Enterprise Manager).
But some students logout after viewing their page by closing the browser window instead of clicking on the logout button.So their logout time is not shown in the database and it shows NULL.
What shud be done to capture the logout time of the students even when they close their window?

Question by:jaiswalpragya
  • 3
LVL 33

Expert Comment

ID: 12576800
you cannot accurately capture window close event
LVL 33

Expert Comment

ID: 12576805
LVL 33

Accepted Solution

hongjun earned 1000 total points
ID: 12576806
May wish to read these

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
function RorC() {

var top=self.screenTop;
if (top>9000)
{alert('window was closed')}
{alert('window was Refreshed')}


<BODY BGCOLOR="#FFFFFF" onunload="javascript:if (document.all){RorC()} else {var top=window.outerWidth;if (top==0) {opener.alert('window was closed')} else {opener.alert('window was Refreshed')}}">
Your Body Here
LVL 17

Assisted Solution

Tacobell777 earned 1000 total points
ID: 12577736
I would do a check upon next login to see if they logged out last time, if not, I would display a nice big message explaining to them why they should log out (Security and all that) and give them a friendly reminder...

Thats about the best you can do.

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question