Results 1 to 4 of 4

Thread: Fieldset not working with "Accept terms" form submission

  1. #1
    Join Date
    Sep 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Fieldset not working with "Accept terms" form submission

    1) Script Title: "Accept terms" form submission

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...acceptterm.htm

    3) Describe problem: Function has problem with fieldsets or legends. Script thinks the object is null.

    Code:
    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. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Code:
    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
    }
    }
    }
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Dec 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Still not working at our place - http://www.1websiteshostingpromotions.com/basic.php
    Please help.
    Thanks and regards,
    Toniya

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by toniya View Post
    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •