after user log out from my web site, I need to save what time they logged out to
database.
Here is my problem: if they click 'log out' button before they close web
browser, it is works fine; but if they did not click 'log out' buttom, they just
close web browser, it will not save data to database even I put code into
Page_Unload section.
any suggestions?
Thanks. 3 2307
Yes.
Do a postback on the windows 'onUnload' event in Javascript and force the
logout. Something similar to this.
_doPostback('Co ntrolname','');
--
Best Regards
The Inimitable Mr Newbie º¿º
"Jason" <j@NoSpamPlease .org> wrote in message
news:6i******** *************** *********@4ax.c om... after user log out from my web site, I need to save what time they logged out to database. Here is my problem: if they click 'log out' button before they close web browser, it is works fine; but if they did not click 'log out' buttom, they just close web browser, it will not save data to database even I put code into Page_Unload section. any suggestions? Thanks.
OK didnt read the last line.
How about the event
onBeforeunload
--
Best Regards
The Inimitable Mr Newbie º¿º
"Jason" <j@NoSpamPlease .org> wrote in message
news:6i******** *************** *********@4ax.c om... after user log out from my web site, I need to save what time they logged out to database. Here is my problem: if they click 'log out' button before they close web browser, it is works fine; but if they did not click 'log out' buttom, they just close web browser, it will not save data to database even I put code into Page_Unload section. any suggestions? Thanks.
Jason,
Page_UnLoad is executed at the end of the page life cycle , not when the
user close the page. this event is useful to clean any objects/recources used
at the page level.
Using Session_End event to record time is one option. But as you are
probabaly aware, the Session_End doesnt fire immediatly when a user leaves..
it fires only after the session expire time is passed (default 20 mins)
"Jason" wrote: after user log out from my web site, I need to save what time they logged out to database. Here is my problem: if they click 'log out' button before they close web browser, it is works fine; but if they did not click 'log out' buttom, they just close web browser, it will not save data to database even I put code into Page_Unload section. any suggestions? Thanks. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: sujeevan |
last post by:
Hi,
i have created a web.
in the 1st page.
user can login.after login i start the session and save it in his
db-record.
also the page give a link to my important page.
in that page i check the saved sid and current sid.if both are equal
it will display some details.that page have the logout link.when user
click that link.the logout.php willwork.it generate a new sid for the
same user. my problem is after logout when the user back from
|
by: Jeff |
last post by:
I've searched the web for hours trying to figure out this problem and
can't seem to find any pertinent answers. I have a website where the
user starts on a login page, puts in their credentials and hits a
submit button, which then takes the user to a 2nd PHP page which simply
runs PHP code that checks the user's credentials from my database, and
if authenticated creates a session, assigns a few session variables
(including a session...
|
by: Harlin Seritt |
last post by:
I have a remote linux server where I can only access it via ssh. I have
a script that I need to have run all the time. I run like so:
python script.py &
It runs fine. When I log off ssh I notice that the script died when I
logged off. How do I make sure it stays running?
thanks,
|
by: crescent_au |
last post by:
Hi all,
I've written a login/logout code. It does what it's supposed to do but
the problem is when I logout and press browser's back button (in
Firefox), I get to the last login page. In IE, when I press back
button, I get to the page that says "Page has Expired" but Firefox does
not do this.
I think it's something to do with sessions not properly unset or
something like that but I haven't been able to figure it out. I am
|
by: kamill |
last post by:
I have done a logout page for logout from admin section and provides a link to logout from admin section.Whenever i clicked on logout link it redirected to index.php of admin section......BUT when i am tring to go back threw back button of Browser....it send me last visted pages(means sessons not expire properly). How can i solve it... One more thing is that the script is working properly on localhost....problem occures when i uploaded it on...
| |
by: chaos |
last post by:
How to do logout alert message when i press on the logout image
<a href="../logout.php" target="_top" onClick="return logout()" "MM_nbGroup('down','group1','logout','',1)""MM_nbGroup('down','group1','logout','../button_images/logout_button_down.png',1)" onMouseOver="MM_nbGroup('over','logout','../button_images/logout_button_down.png','../button_images/logout_button_down.png',1)" onMouseOut="MM_nbGroup('out')" ><img name="logout"...
|
by: shrik |
last post by:
hi everybody.
I have following problem.
There are two pages. index.jsp and main.jsp in my application
Index.jsp contains logging interface in .
It submits password and userid to loginform bean.
following are entries in struts-config.xml file
<action input="index.jsp" name="loginform" path="/login" scope="session" type="com.myapp.struts.loginaction">
<forward name="success" path="/main.jsp"/>
|
by: Kandiman |
last post by:
Hiya, i made a asp page, and one of my divs (as a include) is as below. the problem is if the main page is resubmitted, i get logged out again?...
heres the code.. i think its on the value=true for the hidden textbox on the logout sub.. but how do i get round this? can i not change the value onclick?
<div id=Rightbody>
<!--<form id="RightBodyForm" name="RightbodyForm" method="post" action="Guestbook2.asp">-->
<%
Response.Expires...
|
by: shahidrasul |
last post by:
hi
in my project when i click on logout anchor it goes to logout page and my code in logout page is
if (Session != null)
{
Session = null;
Session.Abandon();
Response.Clear();
FormsAuthentication.SignOut();
Response.Redirect("login.aspx");
}
|
by: DavidPr |
last post by:
When I logout as one user and log in under a different user, it opens with the last user's information.
User 1 - Unsername: Davey Jones
User 2 - Unsername: David Smith
I log out from Davey Jones, then login as David Smith the Welcome message below will show "Welcome Davey". And it will be Davey's information that is accessible - not David Smith's. So something is amiss but I don't know what.
(BTW, this login script is based on the...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |