Detect first time a page loads 
Author Message
 Detect first time a page loads

Hi,
    I have a site where the user logs in and browses from say page 1 to
page 5.
I am calling a function  that should be called when the user is in page
2 for the first time. This function is called on body 'onLoad' of page
2.
Now, say he goes to page 5 and then again comes back to page 2. At this
point I dont want that function to be called on body onload of page 2.

So, is there a way to detect the first time the user goes to page 2 ??
If so pls let me know.

Thanks.

Vikram



Sun, 08 Dec 2002 03:00:00 GMT  
 Detect first time a page loads
Hi

Should be pretty easy to handle this with Session
Set a Session("login") = "ok" (For example)

and skip the onload thingy if "ok";

--
Best Regards
 Vidar Petursson
==============================
  Microsoft Internet, Client, SDK MVP
==============================
 http://www.icysoft.com
 http://www.dna.is



==============================
 No matter where you go there you are
-

Quote:
> Hi,
>     I have a site where the user logs in and browses from say page 1 to
> page 5.
> I am calling a function  that should be called when the user is in page
> 2 for the first time. This function is called on body 'onLoad' of page
> 2.
> Now, say he goes to page 5 and then again comes back to page 2. At this
> point I dont want that function to be called on body onload of page 2.

> So, is there a way to detect the first time the user goes to page 2 ??
> If so pls let me know.

> Thanks.

> Vikram



Sun, 08 Dec 2002 03:00:00 GMT  
 Detect first time a page loads

Quote:
> Hi

> Should be pretty easy to handle this with Session
> Set a Session("login") = "ok" (For example)

assuming he uses ASP, yes, but if not I would suggest using a cookie to
store the value(s)


Mon, 09 Dec 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. detect if page loaded from cache

2. Detecting how a page is loaded.

3. Detecting page load complete in other frame

4. Detecting page load in another frames

5. Detecting that frame has loaded a html page...

6. time delay whan asp page is loaded

7. how do I display a 'page loading...'- image while actual page is loading

8. When page loads, load a page in another frame

9. Loading a page with javascript functions (Always load a cached page)

10. Hell of a Time - Detect Plugins, Close Parent Window, Detect 128 bit Encryption Browser, create Shortcut

11. Controlling which frame/element loads first

12. Preload Images for first load

 

 
Powered by phpBB® Forum Software