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

The Archive Base Latest Questions

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

I have an input textbox which is initially disabled. <input type=text name=count id=count value=0

  • 0

I have an input textbox which is initially disabled.

<input type="text" name="count" id="count" value="0" disabled="true" data-theme="b" />

When I check a radio button i want to enable and focus the textbox, but when i click the radio button it enables the textbox and focuses some other textbox. I think it does not work because the textbox was initially disabled and you can not focus a disabled input.

$(":input[@name='radio']").live('change', function() { 
  $(":input[@name='count']").removeAttr("disabled").focus();
});

How do I enable the textbox and then focus it?

  • 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-30T23:53:00+00:00Added an answer on May 30, 2026 at 11:53 pm

    It appears it was something wrong with the selector … although the text input box got enabled, it did not get focused, while I tried:

    $(":input[@name='count']").removeAttr("disabled").focus();
    

    But when i tried this, it worked:

    $("#count").removeAttr("disabled").focus();
    

    I can not explain why this is happening …


    Edit:
    It has something to the with the selector, because this works too:

    $("input[name='count']").removeAttr("disabled").focus();
    

    but i still can’t understand why using the first selector, the textbox gets enabled, but not focused …

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

Sidebar

Related Questions

I have a textbox which has the code; <input type=text maxlength=5 size=2 value=1 id=paging_textbox>
I have the following problem: I have an HTML textbox ( <input type=text> )
I have an input text which (asp textbox) which is using the jquery ui
I have an if statement that needs to look like this: UPDATE $(input#textbox).keypress(function(e){ key==e.which;
I have created a custom message box with a textbox for input which appears
I have a form which has a input textbox and submit button. On submission
i have coded a header file which contains a input textbox for search.this header
I am having a Password textbox which will have empty value. when the user
I have a textbox which i echo data from mysql. However if there is
I have a textbox which is read-only. It is used to take input of

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.