Click to See Complete Forum and Search --> : Disclaimer page help


stevepugh
09-08-2010, 05:30 AM
I need to create a disclaimer page that appears if a visitor clicks on any link on the home page. This the ACCEPT button must then take them to the page they originally requested and a session cookie should be created so that they don't get asked to agree to terms again whilst they are browsing the site.

It has to be a session cookie as they would need to agree the terms everytime they re-visit the site.

How do I do this?

Please help.

Thanks, Steve

yamaharuss
09-08-2010, 07:31 AM
Do they need to agree every time they click a different link? Or just one time for every link?

In order to set your session you're going to have to do it server-side either via a redirecting page or an AJAX call. I would use AJAX and do the alert/confirm combined with an AJAX file used to set the session variable.

stevepugh
09-08-2010, 10:56 AM
Hi Yamaharuss,

Re. clicks. They only have to click on one of the links, but as I will not know which one they will click I have to have some kind of pass through of the originally requested page so that when they click the 'I Accept' button it takes them to the page they wanted.

In order to set your session you're going to have to do it server-side either via a redirecting page or an AJAX call. I would use AJAX and do the alert/confirm combined with an AJAX file used to set the session variable.

I want to use a server-side session for the session cookie but am not sure how to doe the Ajax bit.

yamaharuss
09-08-2010, 11:43 AM
Just create a simple asp page that sets a session value like Session("linkclicked") = True. Hit that page via AJAX once the user confirms the popup.. then on your AJAX return, redirect the browser to the link they clicked.

then on your pages with links you can wrap the session query around your javascript so it won't fire again if the session value is true

If not Session("linkclicked") then
put your javascript here
End if