[thelist] Dumb Question (Javascript) but still causing difficulties

Kasimir K evolt at kasimir-k.fi
Tue May 11 16:03:16 CDT 2004


> Ok. This checkbox is supposed to be checked initially, but at the same time,
> the user cannot uncheck this checkbox. Don't ask why...

Why...

> One last detail I might mention that must be and is by design. All
> checkboxes are named the same thing. I am going for a comma delimited list
> when the form submits. There are about 60 of these checkboxes.

...I mean, if you need to get those 60 values submitted, but don't 
necessarily have to show them to the user, you could use hidden fields 
like this:

<input type="hidden" name="something[1]" value="value1">
<input type="hidden" name="something[2]" value="value2">
...
<input type="hidden" name="something[60]" value="value60">

which will give you a nice array to play with. In PHP you'd access it like:
$some_array = $_REQUEST['something'];


.k


More information about the thelist mailing list