I know asking to provide me whole code sounds funny. You all must have something important to do. But if you can help me code these, i will be able to finish my project. I can only use html pages and therefor, no service side can be used... so i want to do this in java.
User visits www . domain . ext
Or visits any internal pages www.domain.ext/subfolder
This will redirect them to www.domain.ext/verify.html
To accept that this site is not for kids. (don't worry, its not for nudity or adult etc)
When they click No, i send them directly to Google.com so thats working fine.
When they click yes they are 18. Then they should go back to where they came from the sites page and this time that sites main page or the site's subfolder page will not redirect them to verify.html
So i need as simple as possible the code. This is going to be done through cookie i am sure... so cookie should get expire after minutes.... like 15 minutes. After 15 minutes, if they visit, they should be redirected again. If they clean the cookies, they will be redirect again... etc etc.
So, what is needed
For header file of every page in site:
JS Code to: redirect them for verification. to: verify.html?ref=previous-url-from-where-they-were-redirected
"No" Click will goto Google. Simple Anchor... So i can do that
"Yes" Click will take them to verifIED.html??ref=previous-url-from-where-they-were-redirected <=== here you might want to activate cookie with 15 minutes and then redirect them to from where they came.
Verified.html??ref=previous-url-from-where-they-were-redirected will create the cookie for 15 minutes and http refresh to the ref url from query string. so that the whole site (through header file) can allow him to stay on the site without being redirected to verify.htm again
I know it is tough thing to help someone with that much details, but i am here with hope that someone can take some time to provide me all these codes. And treat me as baby as much as possible so that you don't leave any code to assumed by me
For example, most of the experts give js function code... but duffer like me don't know that the function needs to be called as well. So please explain all these things.
I am really hoping to receive a great reply without being insulted as on other forum, someone said, that WHY SHOULD BE WRITE ALL THESE FOR YOU. But anyways, its their right to say that. But its my humble request to provide me the code. As i really tried using Google search and couldnt find.
If it was php, i would have done this in minutes... but it should be done in html pages :(
Couldn't you just go back one page in the history?
Thank you Ron for your reply. But it has nothing to do with my whole required code :) You did not read my post. But Thanks for taking time.
Well that's handy because this is a job for PHP and it doesn't involve reading the referrer.
Originally Posted by mhquestions
You redirect to the confirmation page in the absence of a cookie that you set on it.