"Bruce Lewis" <br*****@yahoo. com> wrote in message
news:nm******** *****@departmen t-of-alchemy.mit.edu ...
Christopher Benson-Manica <at***@nospam.c yberspace.org> writes:
Can I make a <textarea> and an <input type="checkbox" > invisible?
If they're invisible, aren't they functionally equivalent to
type="hidden"?
Important differences:
1. If a textarea or checkbox is set invisible using styles, their visibility
can be changed dynamically in client-side code.
2. On the other hand, if a textarea or checkbox is set invisible using
styles, then they'll be visible to anyone not using the author's stylesheet.
I use type="hidden" for data I need to pass through a form without the
user's involvement. If the data is a large block of text that would be
displayed in a textarea, then change each double quote inside the text to
" and use the result as the value of the VALUE attribute of the hidden
INPUT.
<input type="hidden" name="textarean ame"
value="double-quote-encoded-data">
If a checkbox would be checked IF it were displayed, then use
<input type="hidden" name="checkboxn ame" value="xyz">
where "xyz" is the VALUE that the checkbox would have. If the checkbox would
be unchecked, then either don't write anything out at all, or write
<input type="hidden" name="checkboxn ame" value="">
depending on the exigencies of the server-side form process and platform.
Using ASP and ordinary Response variables, either way would work fine.