Solved

Executing Javascript Function on Browser Close

Posted on 2004-09-09
6
254 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
  • 4
6 Comments
 
LVL 5

Accepted Solution

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

Expert Comment

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

Expert Comment

by:tzxie2000
Comment Utility
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
Comment Utility
using html under below

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

replace alert function to your java script function

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Purpose To explain how to place a textual stamp on a PDF document.  This is commonly referred to as an annotation, or possibly a watermark, but a watermark is generally different in that it is somewhat translucent.  Watermark’s may be text or graph…
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

744 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now