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

  • Home
  • SEARCH
  • 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 8513945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T04:43:32+00:00 2026-06-11T04:43:32+00:00

Below is my code, after searching so much over the internet; i am not

  • 0

Below is my code, after searching so much over the internet; i am not able to do this simple thing of validation.

    <html>
    <head>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
    <script type="text/javascript">
   $(document).ready(function(){

        $('#myText').click(function(){
           $('#radio1').removeAttr('disabled','disabled');
           $('#radio2').removeAttr('disabled','disabled');
           $('#radio3').removeAttr('disabled','disabled');
           $('#submit').removeAttr('disabled','disabled');
         })
});

    </script>
    </head>
    <body>

    <input type="checkbox" id="myText" value="Click it!">Click it!</input>
    <br/>
    <br/>

    <input type="radio" id="radio1" name="gok" value="Radio 1" disabled="disabled"> Radio 1</input>
    <br/>
    <input type="radio" id="radio2" name="gok" value="Radio 2" disabled="disabled"> Radio 2</input>
    <br/>
    <input type="radio" id="radio3" name="gok" value="Radio 3" disabled="disabled"> Radio 3</input>
    <br/>
    <button type="button" id="submit" disabled="disabled"> Submit</button>
    </body>
    </html>

The checkbox above when checked; the radio buttons gets enabled and submit button is also enabled. I dont think this is a optimized solution; Please help me get a code which has optimized version like
1) if i keep radio & submit buttons in a div and try using the id of div and inside radio buttons are enabled
2) In jquery, i can run a iterator kinda thing which will reduce my code of lines

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-06-11T04:43:34+00:00Added an answer on June 11, 2026 at 4:43 am

    Instead of using an id for each element use the class attribute.

    Try this – DEMO

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

Sidebar

Related Questions

After loosing much sleep I still cannot figure this out: The code below (its
I wanted to generate a list view using below code. But after running this
Below is my code, after searching and working all night, I finally figured how
for the Given below code after int Input Value of 46348 i am getting
In the below code how to remove the hyperlink after getting the innerHTML :
Can somebody explain to me what the below code is doing. before and after
The code below displays either M or F in the GridView column after evaluating
I'm using the javascript code below trying to extract the number after gallery-entry_ in
I am getting an argument of length zero after running the code below. I
I have a segmentation fault in the code below, but after I changed it

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.