Diego_Atos wrote:
Risposta a:
"Tony" <to****@dslextreme.com>
__________________________
Diego_Atos wrote:
Hi you all.
I've an asp.net control, a checkboxlist.
Wrong newsgroup, then. This is a JavaScript NG.
I want to read "checked" properties for all items of my control.
How can i do it?
You would probably have better luck getting an answer in a .NET
newsgroup.
No, i need a client control
But you are posting ASP server code.
<URL:http://msdn2.microsoft.com/system.web.ui.webcontrols.checkboxlist.aspx>
Randy already answered your question.
Give them all the same name and use document.getElementsByName() to get
a reference to the collection of checkboxes. Loop through them to see
which are checked.
Otherwise, put them all in a div, get a reference to the div then use
divRef.getElementsByTagName('input') to get all the inputs. Then loop
through the collection, test for elementRef.type='checkbox' in case
other inputs are in there too.
--
Rob