[Javascript] Retaining values

tedd tedd at sperling.com
Sat Apr 16 10:21:00 CDT 2011


At 11:44 AM +0200 4/15/11, J. Lester Novros II wrote:
>Tedd,
>
>On 04/15/2011 06:26 AM, tedd wrote:
>>I would like your review, if you would be so kind.
>
>Nothing much to add except that I would append the new tr to the 
>'place' table rather than generate a new table, and add a classname 
>to the new td like so:
>
>    td.className = 'newTDclassName';
>
>which would obviate the need for the 'style' property.
>
>If you do the same for the input elements you'll have complete 
>separation of style and script.
>
>Also, to avoid code duplication, you could have a function to 
>generate a table cell with an input in it, using 'name' and 'size' 
>as function arguments and feed its output to the tr 'appendChild' 
>method.
>
>l8R lES

J.

Okay, I think I did what you suggested -- care to look again?

http://webbytedd.com/aa/add-text-field/

I kept two tables because of the controls, but I don't think that's a problem.

The "name" is there to communicate with php (the who, what, and when arrays).

The "size" is there to set the size of the input field because that 
can't be set elsewhere, right?

Cheers,

tedd

-- 
-------
http://sperling.com/


More information about the Javascript mailing list