?
Solved

Executing Javascript Function on Browser Close

Posted on 2004-09-09
6
Medium Priority
?
260 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 200 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this post we will learn different types of Android Layout and some basics of an Android App.
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
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 …
Six Sigma Control Plans

752 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