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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T05:53:49+00:00 2026-05-21T05:53:49+00:00

earlier I asked for help disabling a Button when a drop down menu item

  • 0

earlier I asked for help disabling a Button when a drop down menu item was selected. I was given some code that did the trick but now I need the same with a Textbox and for some odd reason its not working can you have a look for me…

HTML:

<form id="frmColor">
    <input type='TextBox' id='color' />
    <input type='submit' value='Change Color' id="colorSubmit"/>
 </form>

Javascript:

  tools.eraser = function () {
    var tool = this;
    this.started = false;
    var varPenColor = "White";
    context.strokeStyle = varPenColor;
    document.getElementById('frmColor').colorSubmit.disabled=true;
    document.getElementById('frmColor').color.disabled=true;

Any ideas why it wont disable the text box?

Thanks

  • 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-21T05:53:49+00:00Added an answer on May 21, 2026 at 5:53 am

    Form elements can be accessed via the form’s DOM element by name, not by “id” value. Give your form elements names if you want to access them like that, or else access them directly by “id” value:

    document.getElementById("color").disabled = true;
    

    edit — oh also, as pointed out by others, it’s just “text”, not “TextBox”, for the “type” attribute.

    You might want to invest a little time in reading some front-end development tutorials.

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

Sidebar

Related Questions

I asked for help earlier on Stackoverflow involving highlighting spans with the same Class
I asked a question earlier today about singletons, and I'm having some difficulties understanding
Earlier I asked this question How to correctly unit test my DAL? , one
Earlier I asked a question about why I see so many examples use the
Earlier I asked why this is considered bad: class Example { public: Example(void); ~Example(void);
Despite an earlier question ( asked here ), our project is constrained to using
A related question to one I asked earlier ... Just checking on something: Should
This is in reference to a question I asked earlier. Aside from viewing the
This is an attempt to rephrase a question I asked earlier. I'd like to
Earlier today I asked a question about environ , and one of the more

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.