Hello freinds can somebody let me know how to put I agree Button with some text on order preview page and only after clicking I agree user must be able to procced with order.
i think javascript can help here, disable submit button and then enable it after click on "i agree"
amir
2005-09-05 16:26
Yeah but i want to add some text also like some agreement were i can add that text.
amir
ZSiGO
2005-09-05 21:47
Add the below script to the <HEAD> section of head.tpl
<script>
//"Accept terms" form submission- By Dynamic Drive //For full source code and more DHTML scripts, visit 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[i] 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 } } }