I´m working with ASP classic, and I already have a button on my page that select
all ch eckboxes, but when I try to make another button, this new “Button2” select all
checkboxes, I need that button1 ckeck the first column and the button2 chek the 2nd.
column.
Thanks in advance.

Here is the HTML for button2 “Todos sin sup”:
<td>
<td align="right" colspan="10"><input type="button"
name="btn_seleccionar_todo_sin_sup" value="Todos sin sup" onclick="javascript:marcar
(this.form);">
</td>
</td>
The Javascript function:
function marcar()
{
var aa= document.getElementById('entregas');
if (checked == false)
{
checked = true
}
else
{
checked = false
}
for (var i =0; i < aa.elements.length; i++)
{
aa.elements[i].checked = checked;
}
}
The problem is that all of the checkboxes are inside of a container with an id called “entregas.”
When your
forloop iterates through the element withid="entregas"it stops ataa.elements.length, so you will wrap only the checkboxes you want checked for button 1 in an element withid="entregas"and then wrap only the checkboxes that you want to be checked for button 2 in another element with a different, for exampleid="entregas2". Then create a new function called, for examplemarcar2().Change this line in
marcar2():Then use this HTML for button 2: