PDA

View Full Version : Creating a "Terms & Condition" Entry button


firecasey
05-21-2007, 10:20 PM
Hey folks,
Can someone please point me in the right direction to figuring out how to make a SIMPLE checkbox/button that when clicked will allow access to a secure page? Basically, I am making my homepage with a small "Terms & Conditions" form that must be agreed to before the visitor can enter the "main" site. (No it's not an adult site!) One the person has checked the "Agree" button, they are granted access to the main site....

....but I also dont want them to be able to Bookmark the "main site" after they've agreed and bypass the agree to terms and conditions page either. Essentially, there are ad's on this page that I need my visitor's to see everytime they visit the site. Make sense?

Can someone please point me in the right direction. Thanks!!!!

davidj
05-22-2007, 08:25 AM
here you go

see if you can work it out...


<script language="javascript" type="text/javascript">
function proceed(){
chk = document.getElementById('tc');
btn = document.getElementById('submit');
if(chk.checked==true){

btn.disabled = false;

}else{

btn.disabled = true;

}
}

</script>
</head>
<body>
<div id="wrapper"></div>
<p>
<input name="tc" type="checkbox" id="tc" value="1" onclick="proceed()"/>
</p>
<p>
<input type="submit" name="Submit" value="Submit" id="submit" disabled/>
</p>
</body>
</html>