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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:46:19+00:00 2026-05-26T17:46:19+00:00

Is it possible to change the value of an <input type=text> that has been

  • 0

Is it possible to change the value of an <input type="text"> that has been hidden with a style of display:none? I have some JS that seems to work when the input is <input type="hidden"> but not when it’s hidden with display:none. And AFAIK, you can’t change an input’s type with JS either.

Basically, I want to replace an <input> with a <select>, so I’m trying to hide it and append the <select> element.


Take a look at http://jsfiddle.net/5ZHbn/

Inspect the <select> element with firebug. Look at the hidden input beside it. Change the select’s value. The hidden input doesn’t change. Is Firebug lying to me?

If you uncomment the other lines of code, then it works.

Actually… I’m pretty sure it is a bug in Firebug now. Most other things correctly update, but firebug doesn’t show the updated value when I inspect 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-26T17:46:20+00:00Added an answer on May 26, 2026 at 5:46 pm

    I think it’s a Firebug bug.

    That’s because if i query (via the console) the value of the input-text field it is in fact updated, it’s simply that Firebug doesn’t reflect the updated value in the html-tab.

    In fact, using the dom-tab the new value is there, even if the actual node’s value in the html-tab was not updated.

    This seems to happen if you use a “normally visible” element (like an input type=”text”) or similar. If you, instead, use an “normally hidden” element (like an input type=”hidden”), Firebug update its value normally.

    I think it’s a bug in Firebug, that seems to not update an element’s value if it is normally visible but now hidden with css: i’m saying specifically this, because an input with type=”hidden” and display:none is updated nonetheless, so it’s not simply a problem of elements hidden via display:none .

    Hope this helps, i’m about to issue this bug to the Firebug guys.

    UPDATE: i’m using Firebug 1.8.4 on Firefox 8 on Win Srv 2K3.

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

Sidebar

Related Questions

I have a text input field that has some sample text in a light
Possible Duplicate: Styling <input type=file> Style input type file? I`m trying to change a
Is it possible to have an enum change its value (from inside itself)? Maybe
you cant change the value of the input type = 'file' in a form
I have functions on blur and on focus that change a password text field
Is it possible to change object's value not directly? For example a = {x:
Is it possible to change only Y value of background position in CSS? background-position-y
Is it possible to change the starting value on an axis for a chart
Is it possible to change the ConnectionString value in a app.config at runtime? According
Is it possible to change a database connection string value in the Web.Config at

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.