Let's be constructive from now on
HTML Code:
<!DOCTYPE html>
<html>
<head>
<title>Epically simple script</title>
</head>
<body>
<script type="text/javascript">
function acc(ch) {
var sub = document.getElementById('sub');
if (ch) {
sub.disabled = false;
}
else {
sub.disabled = true;
}
}
</script>
<noscript>Sorry, Javascript must be enabled to use this page.</noscript>
<form action="formhandler.php" method="get">
<div>
<textarea id="terms" rows="5" cols="100">These are my terms & conditions</textarea>
<br/>
<label>I accept these terms & conditions</label><input type="checkbox" required onchange="acc(this.checked)" id="accept" />
<br/>
<input type="submit" id="sub" disabled value="Go" />
</div>
</form>
</body>
</html>
It's a checkbox, to allow the user to 'uncheck' the box if they, in fact, don't agree xD. You can make radio buttons 'uncheckable', too, but it involves a fair bit of Javascript that's unnecessary for this.
Last edited by Physicsguy; 01-05-2012 at 10:08 AM..
|