[Javascript] Add elements to form

Christophe Lancian christophe.lancian at cgey.com
Mon Aug 6 10:15:07 CDT 2001


Did you try something like that :

document.formname.[x].value='Hello';

where 'x' is the index of your element in the form.


                  _ ___
     _  _  .-'            ' -.
    (.)(.)/                    \   
    /00                        ;
 o_\\-mm-..........-mm`~~~~~~~~~~~~~~
Christophe Lancian - CGE&Y
Service Line Accelerated Delivery Services
clancian at capgemini.fr
~~~~~~~~~~~~~~~~~~~~~~~~~~~
----- Original Message ----- 
From: "Rees, Mark (TWIi London)" <mrees at twii.net>
To: <Javascript at LaTech.edu>
Sent: Monday, August 06, 2001 12:24 PM
Subject: [Javascript] Add elements to form


> Hello
> 
> I'd like to add some elements to a form. I'm creating a dynamic table and I
> want to be able to save the data in it.
>  At the moment I'm posting a form with lots of hidden inputs, kind of like
> so:
> 
> <td id="1">Hello</td><input type="hidden name="1" value="Hello">
> 
> This seems a bit cumbersome. I've tried 
> 
> document.formname.1.value='Hello';
> 
> Not surprisingly this doesn't work and I get  'document.formname.1 is null
> or not an object'. I haven't been able to find anything at
> developer.netscape.com, irt.org or anywhere else.
> 
> So is it possible?
> 
> Thanks in advance
> 
> Mark Rees
> HTML Programmer
> TWI Interactive
> ext. 7994 
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> http://www.LaTech.edu/mailman/listinfo/javascript




More information about the Javascript mailing list