PDA

View Full Version : Fieldset not working with "Accept terms" form submission



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
}

jscheuer1
02-08-2007, 05:30 AM
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&&tempobj.type&&tempobj.type.toLowerCase()=="submit")
tempobj.disabled=!checkobj.checked
}
}
}

toniya
12-25-2007, 08:01 AM
Still not working at our place - http://www.1websiteshostingpromotions.com/basic.php
Please help.
Thanks and regards,
Toniya

jscheuer1
12-25-2007, 08:17 AM
Still not working at our place - http://www.1websiteshostingpromotions.com/basic.php
Please help.
Thanks and regards,
Toniya

The topic of this old bug report thread is fieldset with this script.

You don't even have a fieldset on your page, so this isn't a bug report, it's just you having trouble with the script. Please start a new thread in the help section:

http://www.dynamicdrive.com/forums/forumdisplay.php?f=2

Give as many details as possible, please. The script appeared to be working on your page to me.