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

The following question is related to a question that I had asked earlier: Help
I'm re-casting a question I asked earlier now that I have an idea of
I asked for help earlier on Stackoverflow involving highlighting spans with the same Class
I earlier asked another question here However, I later realized that my requirements are
I know that this question was asked earlier but the OP didn't get any
I'm going to repeat a question I asked earlier but I need help using
I have narrowed down an earlier question I asked and found out what is
Sorry folks but I asked a question earlier and perhaps did not explain myself
This question is in regard to instances . That I asked earlier. Is it
I asked this earlier, but did a dreadful job describing it. I am looking

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.