473,395 Members | 1,696 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

perform an action when we close the window using the close tab at the top of the screen

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
Thanks

Apr 9 '07 #1
7 3310
On Apr 9, 2:43 pm, tapanre...@gmail.com wrote:
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
Thanks
No takers???? I would be glad if someone can guide me on the above.
Thanks again

Apr 9 '07 #2
ta********@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.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Apr 9 '07 #3
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.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -http://jibbering.com/faq/index.html
Javascript Best Practices -http://www.JavascriptToolbox.com/bestpractices/
r u sure sir? I know why I am leaving my page. But I am not sure about
the second question you put up.
Come on there has to be a way to know i closed my page!!!! other than
window.close().

Apr 10 '07 #4
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/
Apr 10 '07 #5
Ok thanks a bunch for your reply.
Let me be specific abt my problem
I need a link to appear on the parent window once the user has closed
the child window, this is all I need to accomplish.
Maybe you can better suggest me accomplish this task rather than being
too subjective with the original question.

Apr 10 '07 #6
Lee
ta********@gmail.com said:
>
Ok thanks a bunch for your reply.
Let me be specific abt my problem
I need a link to appear on the parent window once the user has closed
the child window, this is all I need to accomplish.
Maybe you can better suggest me accomplish this task rather than being
too subjective with the original question.
Maybe you can consider that people who choose to help you do so of
their free will, and that being a whiny jerk is not a good way to
win friends and influence people.
--

Apr 10 '07 #7
ta********@gmail.com said the following on 4/10/2007 5:19 PM:
Ok thanks a bunch for your reply.
And thank you for quoting, next time, what you are replying to.
Let me be specific abt my problem
I need a link to appear on the parent window once the user has closed
the child window, this is all I need to accomplish.
Set a timeout call that checks for the existence of the child window. If
it is there, remove the link. If the child window is closed, then show
the link:

var theChildWindow = window.open(...)

if (!theChildWindow){
//The window is closed
}

Look at the thread from the last few days of "why is this not working?"
for a discussion on setTimeout and how to use it.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Apr 10 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Michael Brennan-White | last post by:
If I submit my for using a get action the resulting page loads . If I use a post action I get an error page saying "The page cannot be found". I am calling the originating page!!! This happens...
4
by: Robert Dickow | last post by:
This code works perfectly in IExplorer, but in exactly the same context does not work at all in Netscape 7.x. <SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript"> <!-- if...
1
by: RJN | last post by:
Hi Sorry for posting again. I open a few pop-up windows from a main window. If session time out occurs in either the main window or the pop-up windows ,I redirect the user to login screen....
4
by: Lee Chapman | last post by:
Hi, Can anyone tell me why in the code below, the call to ClearChildViewState() has no effect? To paraphrase the code: I'm using view state. I have a textbox and a submit button (and a label...
7
by: | last post by:
Hello, I would like to do the following from a asp.net button click: <form method="POST" action="https://www.1234.com/trans_center/gateway/direct.cgi"> <input type="hidden" name="Merchant"...
4
by: Chrisser | last post by:
Hi I have an Intranet webpage starting with a mainpage from which the user can open a new window using a link that is calling a function: function openWindows(){ var left, top; width =...
37
by: Jan Tovgaard | last post by:
Hey everyone:) We have a critical problem, which I can see that other people also has ran into. In Internet Explorer 7 it is no longer possible to do a window.close after opening a window,...
1
by: Socrates | last post by:
Hi - Have tried for half and hour to get this script to work: I am trying to close the parent window while opening a centred new child window I would be grateful if someone could correct the...
3
by: nareshreddy | last post by:
Hi i am using the below code to close the window and i l get promt when click on 'X' button on ie browser with OK and Cancel buttons. if i click ok window will be closed, if i click cancel window...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.