dynamic forms

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • john

    dynamic forms

    looking for a way to be able to pick different elements of different
    forms and only haveing to write 1 page. So I may 1 time have 3 forms and
    27 elements on each form. I though the syntax for being able to pick an
    element would be document.form[x].element[y].value, but eveytime I try
    this I get a document.form.x is null or not an object, so I wwrote a
    sample program,

    =============== =============== ====
    <form>
    <INPUT type=radio name=radio_name value=t></td>
    </form>
    <SCRIPT language="JavaS cript">
    document.print( document.forms[0].element[0].value);
    </SCRIPT>
    =============== =============== ===

    and get the same error, any ideas, help, or how-tos

    john
  • Evertjan.

    #2
    Re: dynamic forms

    john wrote on 03 okt 2003 in comp.lang.javas cript:
    [color=blue]
    > </form>
    > <SCRIPT language="JavaS cript">
    > document.print( document.forms[0].element[0].value);
    > </SCRIPT>
    > =============== =============== ===
    >
    > and get the same error, any ideas, help, or how-tos
    >[/color]

    document.print ????

    do you want this on your deskjet printer ???

    Try document.write

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)

    Comment

    • VK

      #3
      Re: dynamic forms

      document.forms[x].elements[0].value
      'forms' and 'elements' both in plural

      john <wenjoh26@emNOS PAMail@pct.edu> wrote in message
      news:Xns94097E6 EC8054wenjoh26e mNOSPAMailp@216 .65.98.9...[color=blue]
      > looking for a way to be able to pick different elements of different
      > forms and only haveing to write 1 page. So I may 1 time have 3 forms and
      > 27 elements on each form. I though the syntax for being able to pick an
      > element would be document.form[x].element[y].value, but eveytime I try
      > this I get a document.form.x is null or not an object, so I wwrote a
      > sample program,
      >
      > =============== =============== ====
      > <form>
      > <INPUT type=radio name=radio_name value=t></td>
      > </form>
      > <SCRIPT language="JavaS cript">
      > document.print( document.forms[0].element[0].value);
      > </SCRIPT>
      > =============== =============== ===
      >
      > and get the same error, any ideas, help, or how-tos
      >
      > john[/color]


      Comment

      Working...