Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 06-30-2005, 09:52 AM   #1 (permalink)
leisse
Registered User
 
Join Date: May 2005
Posts: 3
leisse is on a distinguished road
Question Logging out by clicking X button in browser

I'm trying to find a way, either by Javascript or other means, to log a person out of an application when they click on the 'X' button at the top right hand corner of the browser. Basically, here is what is happening:
1. User A logs into a portal.
2. User A clicks on the email icon, that opens up a new window and gives User A his email.
3. User A 'X's out of the portal browser window while email is still up in a separate window.
4. They log into another session of the portal as User B.
5. User B clicks on another link to an online course application.
6. The online course app opens in the same window as the email and shows User A's information.
If you log out instead of clicking the 'X' button, everything works fine and User A's session is killed. I basically need to place the log out code, or some other function, on the form in case of a "hard" browser close.
Any suggestions anyone?
Thanks, Jeff
leisse is offline   Reply With Quote
Old 06-30-2005, 11:16 AM   #2 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,726
redhead is on a distinguished road
Would this give you any hint ?
Code:
<script language="JavaScript">
<!--
 function deleteAllCookies()
{
	if (document.cookie)
	{
		var today=new Date;
		today.setYear(today.getYear()-10);
	
		var cookies=document.cookie.split(";");
		var i=0;
		for (i=0; i<cookies.length; i++)
		{
			document.cookie=cookies[i]+" ;expires="+today.toGMTString();
		}
	}
}
// -->
</script>
<body onUnload="javascript:deleteAllCookies()">
Suitable placed in your main window, which opens the mail-popup.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Reply

Bookmarks

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
drawing shapes in any diagonal direction in applet davidmccabe Java 3 03-17-2005 03:53 AM
Exit Button M.i.S. Nemesis Java 1 01-29-2005 03:24 PM
Firefox browser to hit 1.0 milestone sde Code Newbie News 0 09-14-2004 11:11 AM
Voice operated Web browser in the works sde Code Newbie News 0 03-29-2004 08:37 AM
Feds reject Eolas browser patent redhead Code Newbie News 0 03-08-2004 06:54 AM


All times are GMT -8. The time now is 12:55 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 RC8 ©2007, Crawlability, Inc.





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting