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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:26:20+00:00 2026-05-12T11:26:20+00:00

i have a time dropdown that shows hour in one select, minutes in another

  • 0

i have a time dropdown that shows hour in one select, minutes in another and AM/PM in a third. I have a checkbox that says “All day”

i want it so when the user checks on “All day” all of the select dropdowns become disabled.

  • 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-12T11:26:20+00:00Added an answer on May 12, 2026 at 11:26 am

    The trouble with checkboxes is principally getting them to work right in IE6, since the change event fires at all manner of unhelpful times.

    Let’s start with the function to do the disabling:

    function onCheckChange() {
      if ($("#all-day-checkbox").is(':checked'))
        $("select").attr('disabled', 'disabled');
      else
        $("select").removeAttr('disabled');
    }
    

    Note that I here use just select which is almost certainly more broad than you’d want, but select.some-class-to-identify-the-hours-and-minutes-and-seconds-dropdowns would work just as well.

    Note also that the function figures out itself whether the box is checked, making it idempotent: it’s safe to call repeatedly during the process of checking a box.

    Now we just need to bind that function to a few different events:

    $("#all-day-checkbox").click(onCheckChange).change(onCheckChange);
    $("label[for=all-day-checkbox]").click(onCheckChange);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a pretty basic page that shows every five minutes of the day
I have a time interval that spans years and I want all the time
I have a select box that should be populated only when clicked. The query
mvc - c# - aspx => i have a DDL(drop down list), that shows
I have created a search bar on GAE similar to facebook that shows you
Suppose that I have an ASP.NET page, where a customer can select a product
I have a dropdown list coded as follows; <select name=xyz class=selectbox size=6/> Now as
We have a mobile web site that requires users to enter a specific time
I have a DropdownList that shows a list of providers & the Provider associated
I have some html that creates a dropdown list. The list has text values

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.