Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8227441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T16:07:51+00:00 2026-06-07T16:07:51+00:00

I´m working with ASP classic, and I already have a button on my page

  • 0

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.
enter image description here

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;
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T16:07:52+00:00Added an answer on June 7, 2026 at 4:07 pm

    The problem is that all of the checkboxes are inside of a container with an id called “entregas.”

    When your for loop iterates through the element with id="entregas" it stops at aa.elements.length, so you will wrap only the checkboxes you want checked for button 1 in an element with id="entregas" and then wrap only the checkboxes that you want to be checked for button 2 in another element with a different, for example id="entregas2". Then create a new function called, for example marcar2().

    Change this line in marcar2():

    var aa = document.getElementById('entregas2');
    

    Then use this HTML for button 2:

    <input type="button" id="entregas2" value="Button 2" onclick="javascript:marcar2()" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working with classic ASP. I have an 2 includes that have 2 different
Been working on a classic asp page. I've been using Request.Form(x) and saw that
I have a classic ASP page that was implemented in 2002-ish. It was acting
First of all, I'm still working in classic ASP (vbScript) with an MS Access
I am working on a classic asp form that has a number of dropdowns.
I'm working on a Classic ASP (VBScript) site that's running on a Windows 2008
I am currently converting a very old, but working classic ASP site to ASP.Net.
I'm working with a Classic ASP web app that typically runs well considering the
I am working on classic asp script, which when create file button is clicked
I have this classic ASP site which has been working fine until we updated

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.