I'm currently working on an Age Verification Splash page, but I'm feeling a bit lost.
My script is set up to redirect users to Google if they are under 18, and to the main site if they are 18 or older.
This is my first time dealing with splash pages, so I'm not sure if it references my CSS file. Do I need to add any CSS directly in the code? Any help would be greatly appreciated, thank you!
The website in question is Vaporwrx.com. Currently, the page is all white with the 'box' situated in the top left corner. I need to move the box to the center and change the background color or add an image. Here is the snippet of code I am working with:
<head>
<script language="javascript">
function checkAge()
{
/* The minimum age that is permitted */
var min_age = 18;
/* Change "age_form" to match your form's name attribute */
var year = parseInt(document.forms["age_form"]["year"].value);
var month = parseInt(document.forms["age_form"]["month"].value) - 1;
var day = parseInt(document.forms["age_form"]["day"].value);
var theirDate = new Date((year + min_age), month, day);
var today = new Date();
if ((today.getTime() - theirDate.getTime()) < 0) {
window.location.href = "http://www.google.com/";
return false;
}
else {
/* Set the age check cookie here for accessibility on all pages */
return true;
}
}
</script>
**** PLEASE ENTER YOUR BIRTHDAY ****
<form action="http://www.vaporwrx.com/default.asp" method="post" name="age_form">
Day: <select name="day">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
Month: <select name="month">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
Year : <select name="year">
<option>2013</option>
<option>2012</option>
<option>2011</option>
<option>2010</option>
</select>
<input type="submit" name="senddate" value="Go" onClick="return checkAge()">
</head>