Solved

Executing Javascript Function on Browser Close

Posted on 2004-09-09
6
257 Views
Last Modified: 2010-04-17
I want to invoke/execute a Javascript Function to perform some DB clean-up activity when a user closes his IE browser by clicking on the X (i.e browser close) in the upper right-hand corner of the browser.

Can you give me some idea how I can accomplish this?

Thanks

zeke20
0
Comment
Question by:zeke20
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
6 Comments
 
LVL 5

Accepted Solution

by:
tzxie2000 earned 50 total points
ID: 12022867
int buttone click
        MessageBox.Show(Today.Month.ToString + " " + Today.Year.ToString)
0
 
LVL 5

Expert Comment

by:tzxie2000
ID: 12022899
this may more better
 MessageBox.Show(Today.ToString("MMMM yyyy"))
0
 
LVL 5

Expert Comment

by:tzxie2000
ID: 12022977
sorry for worry enter the comment
it's confused you
I am very sorry

some suggestion for your question
using unload event?!
0
 
LVL 5

Expert Comment

by:tzxie2000
ID: 12023016
using html under below

<body ... onload="alert('welcome')" onunload="alert('byebye')">

replace alert function to your java script function

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

749 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