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 1018443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:51:28+00:00 2026-05-16T10:51:28+00:00

My Goal: Checking radio button will disable the ‘same’ column of dropdownlist in a

  • 0

My Goal: Checking radio button will disable the ‘same’ column of dropdownlist in a number of separate tables.

I understand you can assign ID’s and act on those ID’s, or using by Tag Name. However, I am new to ASP and have a unique situation that neither of these options appear at the surface to work for me.

I have a web form, that has multiple sections. Each section is made up of a Table with 3 columns and X amount of rows. The first column is used for asking a question, the second and third column reference the left and right side of the body and have a dropdownlist of answers in each column:

Example

 <asp:ContentGroup ID="contentgroup1" runat="server" Title="Sometitle">
<table id="Table1" runat="server">
    <tr>
        <td style="text-indent: 20px">
             Do you feel pain:
            </td>
            <td>
                <asp:DropDownList ID="dropdown1" runat="server" TabIndex="601">
                </asp:DropDownList>
            </td>
            <td>
                <asp:DropDownList ID="dropdown2" runat="server" TabIndex="701">
                </asp:DropDownList>
            </td>
    </tr>
</table>
<asp:ContentGroup ID="contentgroup2" runat="server" Title="Sometitle">
<table id="Table2" runat="server">
    <tr>
        <td style="text-indent: 20px">
             Do you feel numbness?
            </td>
            <td>
                <asp:DropDownList ID="dropdown3" runat="server" TabIndex="601">
                </asp:DropDownList>
            </td>
            <td>
                <asp:DropDownList ID="dropdown4" runat="server" TabIndex="701">
                </asp:DropDownList>
            </td>
    </tr>
</table>

So I obviously can’t do something like

var x = document.getElementById('table1').getElementsByTagName("select");
var y = document.getElementById('table2').getElementsByTagName("select");

Or I would would be working with all the dropdownlist . I know classes don’t have to be unique, would that be the only approach – to assign a “class=’left'” to all the for the left column and a “right” class for all the columns on the right and perform some JavaScript on each class?

Goal: There will be a radio button designated for the “Left side” and one for the “Right side”. Selecting a radio button will disable the appropriate column of dropdownlist in all the tables on the form.

Thanks

  • 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-05-16T10:51:29+00:00Added an answer on May 16, 2026 at 10:51 am

    If you are using jQuery you can use the nth-child selector.

    So to access all the left hand drop downs in your first table you could do:

    $('#Table1 tr td:nth-child(2) select');
    

    and the right hand drop downs:

    $('#Table1 tr td:nth-child(3) select');
    
    // or a special case of nth-child: last-child:
    $('#Table1 tr td:last-child select');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Goal I need to alter a number of almost identical triggers on a number
goal : I want to place a text after the submit button using hook_form_alter.
My Goal is to remove the action of checkbox checking by clicking on its
My goal is to display a list of tasks with checkboxes. Checking the checkbox
Goal: Add a new file to a remote git repository without checking the whole
We're checking our code using the PMD 'check' goal that is bound to the
Goal: to programmatically determine the sizes (in bytes) of the fields of a class.
goal: I have the string 1234432144 I want to only replace the first 2
Goal Pass images generated by one process efficiently and at very high speed to
Goal To use a CREATE TYPE statement in HSQLDB 2.0.0 to create a user-defined

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.