how to detect the page has refreshed??

Discussion in 'HTML' started by Matt, Jul 21, 2004.

  1. Matt

    Matt Guest

    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()">
    Matt, Jul 21, 2004
    #1
    1. Advertising

  2. Matt

    SpaceGirl Guest

    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!!
    >
    > 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 #
    SpaceGirl, Jul 21, 2004
    #2
    1. Advertising

  3. Matt

    rf Guest

    "Matt" <> wrote in message
    news:...
    > 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?

    --
    Cheers
    Richard.
    rf, Jul 22, 2004
    #3
  4. Matt

    Toby Inkster Guest

    rf wrote:

    > 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.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
    Toby Inkster, Jul 22, 2004
    #4
  5. Matt

    rf Guest

    Toby Inkster wrote:

    > rf wrote:
    >
    > > 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:


    Ta ,-)

    --
    Cheers
    Richard.
    rf, Jul 22, 2004
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mr. x
    Replies:
    3
    Views:
    10,888
    Daisy
    Sep 3, 2003
  2. Alfons Puig
    Replies:
    0
    Views:
    305
    Alfons Puig
    Aug 28, 2003
  3. abdul bari
    Replies:
    1
    Views:
    462
    Stanley
    Aug 29, 2003
  4. Bill Cohagan
    Replies:
    4
    Views:
    4,178
    Jacob Yang [MSFT]
    Dec 5, 2003
  5. Matt
    Replies:
    1
    Views:
    118
    Richard Cornford
    Jul 22, 2004
Loading...

Share This Page