By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,345 Members | 2,408 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,345 IT Pros & Developers. It's quick & easy.

CheckBoxList and Cicle For

P: n/a
Hi you all.
I've an asp.net control, a checkboxlist.

I want to read "checked" properties for all items of my control.
How can i do it?

I read some tips on the net, but none of them works.
Thanks
--
-La lunghezza effettiva della vita data dal numero
-di giorni diversi che un individuo riesce a vivere.
-Quelli uguali non contano (De Crescenzo)
-Per rispondere in privato potare "POTA" dall'indirizzo-
Jan 30 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Diego_Atos said the following on 1/30/2006 5:42 PM:
Hi you all.
I am not "you all" but have always wanted to meet "you all" though. If
you find him/her let me know so I can meet them.
I've an asp.net control, a checkboxlist.
"checkboxlist"? WTF is that? Is it a checkbox, a list, a select list or
some ASP-centric thingie?
I want to read "checked" properties for all items of my control.
How can i do it?
Write a script that will loop through the checkbox collection based on a
common name or the common tag. Search the archives.
I read some tips on the net, but none of them works.


My stereo doesn't play sound. Whats wrong?

The point of that paragraph is that "none of them work" is a useless
description if you don't show what doesn't work.

Sidenote: All scripts "work" as written, they just don't always do what
the script author wanted them to do.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jan 31 '06 #2

P: n/a
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.

Jan 31 '06 #3

P: n/a
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

thanks
--
-La lunghezza effettiva della vita data dal numero
-di giorni diversi che un individuo riesce a vivere.
-Quelli uguali non contano (De Crescenzo)
-Per rispondere in privato potare "POTA" dall'indirizzo-
Jan 31 '06 #4

P: n/a
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
Feb 1 '06 #5

P: n/a
Risposta a:
RobG <rg***@iinet.net.au>
__________________________

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.


Thanks

--
-La lunghezza effettiva della vita data dal numero
-di giorni diversi che un individuo riesce a vivere.
-Quelli uguali non contano (De Crescenzo)
-Per rispondere in privato potare "POTA" dall'indirizzo-
Feb 1 '06 #6

P: n/a
Diego_Atos wrote:
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


AFAIK, there is no such thing as a "control" in Javascript. That's why
I made the NG suggestion - they'll be more likely to speak the same
language on a .NET newsgroup.

I work with a bunch of .NET people - they do the server-side stuff, I
do the client-side stuff. There's all this talk about "controls" for
them, but that's all irrelevant to me - what I'm concerned with is the
HTML that gets rendered.

If nothing else - I hope that might clarify my suggestion a bit

Feb 2 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.