473,408 Members | 1,938 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,408 software developers and data experts.

close window event

Ubi
I have a popup and I would like to capture the close window event.
How can I do that in javascript?
Daniele
Dec 14 '07 #1
4 2534
Ubi wrote:
I have a popup and I would like to capture the close window event.
How can I do that in javascript?
Daniele
Hmm. I know what this smells like.
Dec 14 '07 #2
Ubi
>I have a popup and I would like to capture the close window event.
>How can I do that in javascript?
Daniele

Hmm. I know what this smells like.
Does it smell like teen spirits? ;-)

I have a web tv:
http://www.cinemaitaliano.info/tv/

I would like to know for how long a visitor stays watching.
I am logging in the database the time when the user opens the window.
I would like to log the time he closes the window, but I don't know how. I
suppose I have to detect the close windows event.

Daniele
Dec 14 '07 #3
Ubi wrote:
>>I have a popup and I would like to capture the close window event.
How can I do that in javascript?
Daniele
Hmm. I know what this smells like.
Does it smell like teen spirits? ;-)
Smelled like those nasty ad popups that won't go away initially.
I have a web tv:
http://www.cinemaitaliano.info/tv/
I would like to know for how long a visitor stays watching.
I am logging in the database the time when the user opens the window.
I would like to log the time he closes the window, but I don't know how. I
suppose I have to detect the close windows event.
Daniele
You can log it easily from the popup itself. Just attach a function to
window.onunload and it can "ping" your tracking system. Or it can make a
call to the parent (opener) window to say it's about to close.
Dec 14 '07 #4
Ubi
>>>I have a popup and I would like to capture the close window event.
>>>How can I do that in javascript?
Daniele
Hmm. I know what this smells like.
Does it smell like teen spirits? ;-)

Smelled like those nasty ad popups that won't go away initially.
Who do you think I am? I am not a bad guy :-(

>I have a web tv:
http://www.cinemaitaliano.info/tv/
I would like to know for how long a visitor stays watching.
I am logging in the database the time when the user opens the window.
I would like to log the time he closes the window, but I don't know how.
I suppose I have to detect the close windows event.
Daniele

You can log it easily from the popup itself. Just attach a function to
window.onunload and it can "ping" your tracking system. Or it can make a
call to the parent (opener) window to say it's about to close.
OK, I'll try with the onunload event.

Thanks!

Daniele
Dec 14 '07 #5

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

Similar topics

2
by: RJN | last post by:
Hi I have a datagrid which has linkbutton as a template column. The Linkbutton is used to open new windows. I can open multiple windows at a time. On close of any of the child windows,(i.e, on...
1
by: RJN | last post by:
Hi I have a pop-up window which has a task menu on its left which are nothing but links to different screens. This window also has a close button. On click of close button I do some server side...
4
by: Hitesh | last post by:
Hi, I am opening an Modal dialog box using the window.Showmodaldialogbox(), and in that window i am having an aspx form with say one ASP.NET Button control. i am doing some operation on the...
0
by: Vam$y | last post by:
In asp.net how to catch window close event when a user closes the window explicitly by clicking on “x” button which is on the right top corner of the browser. My requirement is When a user...
5
by: lindanr | last post by:
In ASP.NET 2005 I have an onblur="window.close()" javascript event in the <body> tag. When I click on the window's scrollbar, the window closes. The same code works fine in ASP.NET 2003. Any...
1
by: nebulus | last post by:
I'm working on a web app that under normal circumstances will be happy with the Session_OnEnd event, but when a user leaves a page by closing the browser by either Alt+F4 or just hitting the "X",...
5
by: jimmy | last post by:
Hi all, I want to capture the event when the browser's close button is clicked in an html page. I tried using the event.ClientX and event.ClientY property in the body unload event, and this...
4
by: bsm | last post by:
Hi, I have googled for my issue in this group. This question was asked many times and many solution was given. But I want clear cut solution for the issue. The issue is: I tried to capture...
19
by: BibhuAshish | last post by:
Hello, I have created a context menu in mozilla by using following code: function nrc(e) { var contextMenu; document.oncontextmenu = function (evt) { var srcElement; if (evt &&...
1
by: dittu | last post by:
How to close the popup window when submitting the form? I have a sample.jsp. In that page one button is there. when button pressed, open popup window contains one "text box" and one " submit...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.