Welcome, Guest
  • Author Topic: getting the form data?  (Read 1813 times)

    saumya

    • Senior Programmer
    • ****
    • Posts: 496
      • View Profile
      • currently active
      • Email
    getting the form data?
    « on: 09/18/06, 12:57 »
    Hi,
    here is my situation :
    1. I have a form named "registration"
    2. In a javascript function I got the number of form elements through
    Code: [Select]
    var max=document.registration.length;But I could not get values of each elemt on the form.
    I tried
    Code: [Select]
    var max=document.registration[0].value;

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: getting the form data?
    « Reply #1 on: 09/19/06, 05:29 »
    Use the name of the element. I.e, a textfield named name, use:

    document.registration.name.value

    Jorge