Looks more like pseudocode to me... If it's done on the server (using ASP) then this idea should work fine. You actually will be "coming from page 3" cause this is what is what is written in the http headers. You can look into the Server Variables collection to determine which page the user came from (HTTP_REFERRER) Dave