Vackhus
06-20-2005, 12:58 AM
Hello there,
I have a well known script for that job(see subject), but I face a problem I really can understand it.
First I must say that I create check boxes dynamically with asp scripting. Everything with that script going very well. But, there are cases when the number of the (dynamically)created checkboxes is just one, then that script is not working.
The script follows:
function CheckThem()
{
var TheBox=document.form1.R;
for (i = 0; i <= TheBox.length; i++)
TheBox[i].checked = true ;
}
Any ideas to make it work for one checkbox too?
Thank you for your time.
I have a well known script for that job(see subject), but I face a problem I really can understand it.
First I must say that I create check boxes dynamically with asp scripting. Everything with that script going very well. But, there are cases when the number of the (dynamically)created checkboxes is just one, then that script is not working.
The script follows:
function CheckThem()
{
var TheBox=document.form1.R;
for (i = 0; i <= TheBox.length; i++)
TheBox[i].checked = true ;
}
Any ideas to make it work for one checkbox too?
Thank you for your time.