mattturley
asked on
JavaScript Run Once
I need to run the following code one time only. If a user comes back to the page containing the code, it should not run again. I have been looking at using cookies, but am not sure of the exact implementation.
goSub("/user/site/browseCa talog.do", "menu1","t op");
Thoughts on best approach? Ideally the cookie (or other means) would expire when the user exits their browser.
goSub("/user/site/browseCa
Thoughts on best approach? Ideally the cookie (or other means) would expire when the user exits their browser.
What you'll need to use is a session cookie and before excuting "goSub("/user/site/browseC atalog.do" ,"menu1"," top");" check if the session cookie exists.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
worked.