HTML DOM: Access to control problem

Discussion in 'HTML & Website Design' started by vnviews, Oct 20, 2006.

  1. #1
    Hi, all.
    I need help with HTML DOM.
    When I check number of controls in form, it would be document.forms(i).length, right?
    But if the form has control with name "length", this returns the reference to this control.
    Is anyone experienced with it?
    Thanks.
     
    vnviews, Oct 20, 2006 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    Try
    
    var num = document.forms.length;
    Code (markup):
    If you specify an index, it returns only the the name of the indexed form.

    cheers,

    gary
     
    kk5st, Oct 20, 2006 IP