how to detect the page has refreshed??

M

Matt

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()">
 
S

SpaceGirl

Matt said:
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()">

Server side script... when the page loads, set a session variable. You
can write a test to see if that variable already exists - if it exists,
then the page has already been loaded and has most likely just been
refreshed.

<%

if session("pageactive") = true then
' the page has already been loaded, so do whatever...
session("pageactive") = ""
else

session("pageactive") = true

end if


%>







--


x theSpaceGirl (miranda)

# lead designer @ http://www.dhnewmedia.com #
# remove NO SPAM to email, or use form on website #
 
R

rf

Matt said:
When the page is refresh,

So you said over in clj.

Do you *ever* post here without posting a duplicate over there?

Will you *ever* learn that multiposting is bad, that it causes two totally
seperate conversations to start, usually wasting peoples time?

Will you *ever* learn to crosspost. Here is a lesson. In your Newsgroups:
field type

alt.html;com.lang.javascript

Now, was that hard?
 
T

Toby Inkster

rf said:
Will you *ever* learn to crosspost. Here is a lesson. In your Newsgroups:
field type
alt.html;com.lang.javascript

Actually the standard seperator is a comma:

From RFC 1036:
| The "Newsgroups" line specifies the newsgroup or newsgroups in which
| the message belongs. Multiple newsgroups may be specified, separated
| by a comma. Newsgroups specified must all be the names of existing
| newsgroups, as no new newsgroups will be created by simply posting to
| them.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top