On Apr 18, 8:37 pm, bruce barker <nos...@nospam.comwrote:
var count = 0;
var els = document.getElementsByTagName('input');
for (var i=0; i < els.length; ++i)
{
var e = els[i];
if (e.type == 'checkbox'
&& e.name == '<%=ChkBoxList.UniqueID%>'
&& e.checked)
++count;
}
-- bruce (sqlwork.com)
haresh.a...@gmail.com wrote:
hello to all,
I m using .net 2.0 and i face a problem that is as under
Well I have a checkboxlist which i bound in .cs page
now I want to count that how many checkboxes ate checked ( In
javascript ) and
checked checkboxes text will be concat and that string will be pass on
to report query
I m trying on by this code but it's not work
so have you great mind and great idea for this then pls tell me.
Code:
which I refere for count checked checkboxes
alert(frm.Chkboxlist);
for (var i=0; i<frm.Chkboxlist.items.count-1;i++)
{
alert('i=' + i);
if(frm.Chkboxlist.items.checked)
{
alert(str);
str = frm.Chkboxlist.selecteditems + ' ';
}
}
Hope for quick reply
you can mail me on
haresh_can...@yahoo.co.in
thanks- Hide quoted text -
- Show quoted text -
thanks for quick reply me
Still I face this problem
I once again repeat my problem
I want to count that how manycheckboxes are checked in the
checkboxlist
the checkboxlist is run time filled (by Data binding)
I can not track or count that how many checkboxes are there
can you tell me how can i refere checkbox of a checkboxlist?(keep in
mind that i m not using array for filling checkboxlist)
I have already use for this like checkboxlist.count ( but it's not
work)
have you any example for this?
pls help me ASAP
thanks