Print Page | Close Window

Accept Terms form - pointed links

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: General Discussion
Forum Description: General discussion and chat on any topic.
URL: https://forums.webwiz.net/forum_posts.asp?TID=8413
Printed Date: 30 March 2026 at 11:01pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Accept Terms form - pointed links
Posted By: Lucent
Subject: Accept Terms form - pointed links
Date Posted: 29 December 2003 at 6:25pm

Hi I found this script on one website.. how do I change it so when peopl click on submit, it will jump to the link I pointed? any help would be great, thank you in advance.

Step 1: Add the below script to the <HEAD> section of your page:

<script>

//"Accept terms" form submission- By Dynamic Drive
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com - http://www.dynamicdrive.com
//This credit MUST stay intact for use

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
if(tempobj.type.toLowerCase()=="submit")
tempobj.disabled=!checkobj.checked
}
}
}

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
}
}
}

</script>

Step 2: Insert the below sample form onto your page, which also demonstrates how to associate the script with your own form:

<form name="agreeform" onSubmit="return defaultagree(this)">
Rest of your form here<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>

<script>
//change two names below to your form's names
document.forms.agreeform.agreecheck.checked=false
</script>

<p align="center"><font face="Arial" size="-2">Free DHTML scripts provided by<br>
<a href="http://www.dynamicdrive.com">Dynamic'>http://www.dynamicdrive.com">Dynamic Drive</a></font></p>




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net