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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T04:15:06+00:00 2026-06-01T04:15:06+00:00

I have those two html radio buttons and textarea. I basically want to enable

  • 0

I have those two html radio buttons and textarea. I basically want to enable the textarea when Yes is selected, and disable it otherwise.

<input type='radio' id='comment' name='comment' value='Yes'>Yes
<input type='radio' id='comment' name='comment' value='No' checked="checked">No

<textarea id='writehere' name='writehere' cols='25' rows='2'></textarea>

Below is my jQuery. The commands only occur when I put it back to value No. But I want those commands to be executed everytime the “comment” is changed, regardless of Yes or No.

$('#writehere').attr('disabled','disabled');

$('#comment').change(function(){
        if ($('#comment').val() == 'No')
            $('#writehere').attr('disabled','disabled');

        if ($('#comment').val() == 'Yes')
            $('#writehere').removeAttr('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-06-01T04:15:07+00:00Added an answer on June 1, 2026 at 4:15 am

    you have 2 id that are the same that’s your problem.

    It’s not W3C valid and in those situation jQuery will only proceed the first id.

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

Sidebar

Related Questions

I have two groups of radio buttons set up in one form: <li>1&nbsp;<Input type
I want to have two radio buttons in my Asp.Net MVC3 App.There is no
I've got this HTML form where I have multiple input elements: text, radio, and
I have a form with two integer-only text boxes, one group of radio buttons,
I have a html file and two keywords and i want to get all
I have two HTML FILES , when I click on those HTML Files ,
Say, I have two HTML elements - an input field and a button. The
Basically I have two html strings: a = Cowboys, Eagles, Redskins, Giants b =
I am using jQuery to customize some radio buttons. I have two different radio
I have those two tables: client: id (int) #PK name (varchar) client_category: id (int)

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.