[Javascript] Add elements to form

TomMallard mallard at serv.net
Mon Aug 6 12:23:34 CDT 2001


This is a perfect place for using the xmldom to store everything...

Anyway, you don't need to use the form data if you use div's within td's or
the td tags. These would be scriptable using the style attribute of the
document.divID object and can use the same naming convention.

tom mallard
seattle
----- Original Message -----
From: "Rees, Mark (TWIi London)" <mrees at twii.net>
To: <javascript at LaTech.edu>
Sent: Monday, August 06, 2001 9:34 AM
Subject: RE: [Javascript] Add elements to form


> Hello
>
> thanks for all the help, but I don't think I explained myself clearly
> enough.
>
> This is called in an "edit table" function (i.e. responds to an onclick
> event after the whole page has loaded). So I have a table to which you can
> for example add rows. Each cell has an individual form input containing
its
> value, formatting etc. What I was looking for was some way to do this
> dynamically (since the cells are named with respect to their position in
the
> table, like row1column3 for example). So instead of having to write out
> every time
>
> <input type="hidden" name="R1C1" value="some text|bold">
>
> I fancied document.form.R1C1.value='sometext|bold';
>
> But it isn't having it. I presume this is because, as Hassan said, the
form
> elements collection is read only (presumably he means you can't create new
> elements like this, because obviously you can change the value of existing
> elements)?
>
> Is that clearer?
>
> Cheers
>
> Mark





More information about the Javascript mailing list