Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 9th, 2008, 6:03 PM   #1
sudha
Newbie
 
Join Date: Apr 2008
Posts: 1
Rep Power: 0 sudha is on a distinguished road
Window close event

Hi Guys,

I am using the following javascript code in my dbconnect.asp file to catch the window close event to update the database in logout.asp.
window.onbeforeunload = 
 function(){
  if((window.event.clientX<0) || (window.event.clientY<0)){
      changeStatus();
  }
 }

function changeStatus() {
 
 window.location = "logout.asp"
 
 }
this code works fine but when I am navigating the site and click the browser back button the system is throwing me out. how can I prevent this

Can anybody help me with this?

Thanks in advance

sudha

Last edited by Ancient Dragon; Apr 10th, 2008 at 8:28 PM. Reason: add code tags
sudha is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Window resize event? titaniumdecoy Java 1 May 1st, 2006 1:09 AM
Can Perl do this window popup? Ficus Perl 23 Mar 27th, 2006 2:38 PM
Download Blocker Finished - Random Text in Window Title? bigguy Visual Basic 1 Jan 13th, 2006 1:05 PM
Arranging Views of Project Explorer, Property window and Form Layout java_roshan Visual Basic 6 Sep 30th, 2005 2:55 PM
New Window Chris Weimer HTML / XHTML / CSS 3 Sep 20th, 2005 9:18 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:24 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC