Web Analytics Made Easy -
StatCounter element references & forms? - CodingForum

Announcement

Collapse
No announcement yet.

element references & forms?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • swmr
    replied
    Sounds good; thanks for the information.

    Leave a comment:


  • liorean
    replied
    document.forms[formname].elements[elementnameorid] should work for all form controls, including object elements whose declare attribute is not set. I'm not sure you can rely on browsers when it comes to this, however, so it's safer to use document.getElementById(objectid)

    Leave a comment:


  • swmr
    started a topic element references & forms?

    element references & forms?

    Should document.form.name.element.name apply only to the form.elements collection?

    For example, which reference should be used for an <object> in a form:

    document.form.name.object.name -or- document.getElementById(object.id)

    or does it matter?
Working...
X