View Single Post
Old 11-14-2012, 01:21 AM   PM User | #5
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,454
Thanks: 0
Thanked 498 Times in 490 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
Note that this is a situation where you need the JavaScript attached in the head of the page rather than at the bottom of the body where most JavaScript goes.

Basically the processing would be

1. set count to zero
2. read the cookie if it exists replace the count with the value from the cookie
3. add 1 to the count
4. save the cookie
5. If the count is greater than 3 then redirect
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote