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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:58:14+00:00 2026-05-30T11:58:14+00:00

I have three check boxes (checkbox1 , 2 and 3) . I want to

  • 0

I have three check boxes (checkbox1 , 2 and 3) . I want to disable ‘check box 3’ when I click on check box 1 and Enable check box 3 when click check box2. This is working fine, but after adding hidden field for check box 3, the disabling is not working.Please see my code below. Could anyone please help me ?

<html>
<script> 
 function callFun1()
 { 
   document.getElementById('three').disabled=true; 
 }   
 function callFun2()
 { 
   document.getElementById('three').disabled=false; 
 }
</script>
  <head>     
    <body>             
      <table border="2" align="center">     
         <tr><td>CheckBox 1  <input type="checkbox" name="one" id="one" value="true" onClick="callFun1()"></td></tr>         
         <tr><td>CheckBox 2  <input type="checkbox" name="two" id="two" value="true" onClick="callFun2()"></td></tr>     
         <tr><td> CheckBox 3 <input type="hidden" name="three" id="three" value=""/>
                             <input type="checkbox" name="three" id="three" value="true" /> </td> </tr>     
      </table>        
    </body> 
  </head>  
</html>

Thanks in advance!

  • 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-30T11:58:16+00:00Added an answer on May 30, 2026 at 11:58 am

    Because you have added a field with the same id and document.getElementById('three') only returns the first field because id should be unique

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to disable and enable three checkboxes. if the user clicks on one
I want read-only check boxes to be greyed out, but display their checked/unchecked status
I have a div named box which contains three classes. I want to create
Have three divs in a container that I want to float over a large
I've got a list box where the items are check boxes. When the list
I have a form which has a question and the answer are the check-boxes
i have three checkboxes in my preference screen. i want to make the user
I have developed a MVC3 application in that I want use the Check boxlist
i have been working on this code ! and i couldn't done it right
I have three checkboxes like ch[0], ch[1] and ch[3] (sometimes i have more, or

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.