smorelli
02-07-2007, 11:27 PM
1) Script Title: "Accept terms" form submission
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex16/acceptterm.htm
3) Describe problem: Function has problem with fieldsets or legends. Script thinks the object is null.
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
}
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex16/acceptterm.htm
3) Describe problem: Function has problem with fieldsets or legends. Script thinks the object is null.
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
}