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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:39:06+00:00 2026-05-22T16:39:06+00:00

I have a form set up which links to a database to show specific

  • 0

I have a form set up which links to a database to show specific products with the requirement chosen, for example:

Category >
Manufacturer >
Paper Size >

Each of these drop downs have different attributes. The client has requested, that once Software is selected from the Category drop down that the paper size and speed drop downs become disabled.

How would I do this?

My code is:

<select id="category1">
                <option value="all">All</option>
                <option value="printers">Printers</option>
                <option value="software">Software</option>
        </select>

        <label class="minus_margin">Manufacturer: </label>
        <select id="manufacturer1">
        <option value="canon">Canon</option>
            <option value="HP">HP</option>
            <option value="epson">Epson</option>
        </select>

        <label class="minus_margin">Paper Size: </label>
        <select id="paper_size1">
            <option value="all">A4 &amp; A3</option>
            <option value="A4">A4 Only</option>
        </select>

        <label class="minus_margin">Speed: </label>
        <select id="speed1">
            <option value="all">All</option>
            <option value="20">0-20</option>
            <option value="34">21-34</option>
            <option value="44">35-44</option>
            <option value="54">45-54</option>
            <option value="69">55-69</option>
            <option value="89">70-89</option>
            <option value="90">90+</option>
         </select>`

For example, user selects software, paper size and speed drop-downs become disabled.

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-22T16:39:07+00:00Added an answer on May 22, 2026 at 4:39 pm

    You could use the onChange event with jQuery to detect when the content of the drop-down has changed and just disable the drop down.

    Something like:

    $('#dropDown').change(function() {
        if ($(this).attr("disabled") == false) { $(this).attr("disabled","disabled"); }
    }
    

    To Enable it back you would use something like:

    $('#dropDown').removeAttr("disabled");
    

    EDIT:

            $('#category1').change(function()
            {
                var selected = $(this).val();
    
                if (selected == 'software')
                {
                    $('#paper_size1').attr("disabled","disabled");
                    $('#speed1').attr("disabled","disabled");
                } else {
                    if ($('#paper_size1').attr("disabled") == true) { $('#paper_size1').removeAttr("disabled"); }
                    if ($('#speed1').attr("disabled") == true) { $('#speed1').removeAttr("disabled"); }
                }
            });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my c# application i have this small form which is used to set
I have a windows form application which needs to be the TopMost. I've set
I have a web application which displays set of components in the form of
Is there an easy way to have the form helpers set the tabindex parameter
I have form that displays several keywords (standard set of choice lists that changes
I have a ListView control on my form set up like this in details
Okay, so I have this form that is set to preload a DB record
I have set the form decorators in this way: <?php $this->setElementDecorators(array( 'Label', array(array('labelTd' =>
I have a parent form that is set to be TopMost and then I
I have a form action that needs to have its value set from a

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.