ta********@gmail.com said the following on 4/10/2007 3:11 PM:
On Apr 9, 4:44 pm, Randy Webb <HikksNotAtH...@aol.comwrote:
>tapanre...@gmail.com said the following on 4/9/2007 3:43 PM:
>>I am looking to perform an action when we close the window using the
close tab at the top of the screen.
I know how to do it using a close button but I was wondering if there
is way to achieve the above.
Waiting for some suggestions
Best suggestion you will read: Give up now. You have no way of knowing
why I left a page, and it is not even assured that you can know I left.
<snipped signature that shouldn't have been quoted to start with>
r u sure sir?
I am as positive as positive can get. Unless it has to do with my
negative energy to counter-act all the positive energy in the Universe
and thereby keeping it from collapsing upon itself.
I know why I am leaving my page.
You may know as a user why you left but you have no way of knowing as a
programmer why a person left. You can't even rest assured they left.
But I am not sure about the second question you put up.
Question? Second Question? I didn't even post one question much less two.
Come on there has to be a way to know i closed my page!!!! other than
window.close().
window.close() won't tell you the page closed, it will attempt to close
the page.
You can try onunload and onbeforeunload but they are not reliable.
Just when you think you have it figured out, open your page and unplug
your computer (simulating a power outage) and then let me know how you
know, as the programmer, that the page got closed.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -
http://jibbering.com/faq/index.html
Javascript Best Practices -
http://www.JavascriptToolbox.com/bestpractices/