[thelist] php: how to reselect a checkbox on page reload

Jeff Howden jeff at jeffhowden.com
Sat Aug 9 18:53:46 CDT 2003


wesley,

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: **1st Vamp**
>
> [...] depreciated
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

it's deprecated, as in soon to be obsolete, not depreciated, as in having
less value.  sorry, pet peeve.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> [...] last time I checked, and CSS is preferrable.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

yes, but not as widely supported and can be quite quirky at times.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> The checked attribute is boolean, and can so be set to
> true or false.  i.e. checked="true" I believe in this
> case, any value such as "checked" sets it to true.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

actually, it seems that no matter what the value is the browser will set the
checkbox to checked, even if the value is false.  so, it's really an all or
nothing sort of thing.  if you don't want it checked, you omit the attribute
altogether.  otherwise, including it will mean the browser should render it
as checked.  i checked in both win/ie6 and win/firebird and they both
behaved identically.

when it comes to the value being boolean, i think that only applies in
scripting:

oForm.myCheckbox.checked = true;
oForm.myCheckbox.checked = false;

.jeff

------------------------------------------------------
Jeff Howden - Web Application Specialist
Resume - http://jeffhowden.com/about/resume/
Code Library - http://evolt.jeffhowden.com/jeff/code/




More information about the thelist mailing list