|
<HTML>
<head><title>Form Agreement</title>
<script>
var checkobj
function agreesubmit(el){
checkobj=el
if (document.all||document.getElementById){
for (i=0;i<checkobj.form.length;i++){ //hunt down submit button
var tempobj=checkobj.form.elements[i]
if(tempobj.type.toLowerCase()=="submit")
tempobj.disabled=!checkobj.checked
}//--if(tempobj)
}//--for
}//--if(document)
function defaultagree(el){
if (!document.all&&!document.getElementById){
if (window.checkobj&&checkobj.checked)
return true
else{
alert("Please read/accept terms to submit form")
return false
}//--if(window)
}//--id(document)
}//--function
</script>
</head>
<body>
Please read first our term and conditions
<p>
<form name="agreeform" onSubmit="return defaultagree(this)">
<textarea rows=5 cols=20></textarea>
<br>
<input name="agreecheck" type="checkbox" onClick="agreesubmit(this)"> <b>
I agree to the above terms</b><br>
<input type="Submit" value="Submit!" disabled>
</form>
</body>
</html> |