Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 270
  • Last Modified:

Executing Javascript Function on Browser Close

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
zeke20
Asked:
zeke20
  • 4
1 Solution
 
tzxie2000Commented:
int buttone click
        MessageBox.Show(Today.Month.ToString + " " + Today.Year.ToString)
0
 
tzxie2000Commented:
this may more better
 MessageBox.Show(Today.ToString("MMMM yyyy"))
0
 
tzxie2000Commented:
sorry for worry enter the comment
it's confused you
I am very sorry

some suggestion for your question
using unload event?!
0
 
tzxie2000Commented:
using html under below

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

replace alert function to your java script function

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

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.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now