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

how to detect the page has refreshed??

When the page is refresh, it will first call window_unload() and
then call window_load(). The problem is I window_unload() is
invoked when the user click close button, or right top icon close
button. I don't want refresh will call window_unload. Any ideas?
thanks!!

function window_load()
{//etc..
}

function window_unload()
{//etc..
}

<BODY ONLOAD="window_load()" ONUNLOAD="window_unload()">
Jul 23 '05 #1
1 2561
Matt wrote:
When the page is refresh, it will first call window_unload()
and then call window_load(). The problem is I window_unload() is
invoked when the user click close button, or right top icon
close button. I don't want refresh will call window_unload. Any
ideas? thanks!!

<snip>

You have neglected to say why you want to do this.

The unload event is called whenever a page is unloaded for any reason
(except on the browsers that do not bother to call it when the browser
is closed). The only way of attributing a reason for the unload is when
it is the direct result of an action initiated within the document
(navigation, form submission). However, there is an extensive list of
user actions that will result in a page unloading, including closing
down the browser and refreshing the page, and no way of knowing which of
them applies to any given unload.

Almost any design that called for an interest in the distinction between
refreshing a page and closing a browser window would be unsuitable for
use over HTTP (as it is a stateless protocol).

Richard.
Jul 23 '05 #2

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

Similar topics

0
by: Alfons Puig | last post by:
I have a container page with 3 frames (Header, left frame and right frame) In the right frame I load an aspx page having a boounded datagrid with some column templates having a DopDownList in the...
1
by: abdul bari | last post by:
Hi I have a standard html form which is generated by an XSL sheet. The form data is submitted to the server and is passed on to file.aspx for processing. However file.aspx is refreshed every 5...
10
by: Nathan Sokalski | last post by:
One thing that I have often needed to do that I have been unable to find a way to do is refresh the page (basically do the same thing as pressing the browser's Refresh button). I know how to do...
5
by: J-T | last post by:
Is there a way to detect if a user has refreshed a page in asp.net? Thanks a lot
4
by: SSS | last post by:
Hello there, My problem is that I have a page which is displaying 4 real time data values which are being refreshed every one minute. On the same page I have other text boxes where user enters...
0
by: arunprabu | last post by:
Hi, I have a problecm with the AJAX request in my webpage. I have some filters on top of the page. I have a submit button and an empty div below the filters. Some of the filters have ajax...
1
by: JimO | last post by:
I'm trying to write an ASP interface that mimiks a .Net datagrid control. I'm having a problem when I'm in the middle of an Edit, Update, or a New Record. If the user hits the wrong button, the...
3
by: Mythilisg | last post by:
hi, i'm working in asp.net with c#. i hav one dropdownlist with some options which is similar to Security Questions in yahoo mail. I hav one option called "If Others". When the user selects this...
1
by: jim bradshaw | last post by:
I have an asp.net page that calls itself recursively if the user selects certain actions on form buttons. The page will be changed in various ways according to the action called for by the user....
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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
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...

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.