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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:53:20+00:00 2026-06-18T10:53:20+00:00

Brief: I need to grab the information in parentElement, but I need the input

  • 0

Brief: I need to grab the information in parentElement, but I need the input information updated. when I am grabbing the innerHTML of parentElement, after the box is unchecked, it still shows up checked. The html is not reflecting changes I’ve made with javascript.

I have a small snippet of my code here: http://jsfiddle.net/7993K/8/

<div id="parentElement">
<label id="thisLabel">
    <input type="checkbox" id="idnumber" checked="checked"> Bring Mail Inside
</label>
</div>
<p>
<a onClick="checkit()">Check it out</a>
</p>
<p onclick="checkToggle()">change to false</p>


function checkit() {
alert(document.getElementById("parentElement").innerHTML);
}
function checkToggle() {
element = document.getElementById("thisLabel");
element.childNodes[0].checked = false;
alert("the checkbox is checked: " + element.childNodes[0].checked);
}

The slightly longer version of why I am going about it like this:
This is a large form that a site inspector checked out. It is brought into an online software app, and the lady in charge of communication with clients will review this information, speak back with the inspector on the phone. This form is saved in a database as html. After the woman is done reviewing the form, there may be a box or two that wasn’t checked, that she would like to check, before emailing to the client ( there were issues, needed to be fixed, now that they are fixed, she can send out the proper report that everything was checked off)

She checks the boxes off, but they don’t update the HTML, they only change the value, which will show, but won’t show up when I get the innerHTML of parentElement. You will see in my JSFIDDLE http://jsfiddle.net/7993K/8/:

Click check it out upon loading: checked = checked

uncheck box: checked = checked

change to false: alert confirms the checked property is false, but check it out shows the innerHTML as checked.

I will need to access this innerHTML with the proper information loaded (as in, if it is checkmarked, the html should reflect that)

PRE-EDIT: I think I can do this by making an event onclick of the label. That event takes the (“parentElement”).innerHTML and split it in a few different places and put it back together with the right checked value. Will be slightly different if the input isn’t checked to begin with. That is the only way I can think of doing this, and it just doesn’t seem like the right way.

  • 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-18T10:53:21+00:00Added an answer on June 18, 2026 at 10:53 am

    This is happening because element.childNodes[0].checked = false; is setting the DOM property, which is a separate entity than the HTML attributes.

    Your checkit function should also be interrogating the DOM property, not checking the innerHTML.

    See this question for more information about DOM properties and HTML attributes.

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

Sidebar

Related Questions

Problem description is brief but I think I don't need to say much. When
I need a brief explanation on how the two commands isdigit() and isalpha() work.
Brief summary: I need a script/plugin for Firefox that selects the load next 25
I need a command line parsing utility. In the brief 10 second that I've
i need to implement this scenario Brief about that is have two java based
I need help in creating an query interface with access database. In brief, with
A brief background: I'm working on a web-based drawing application and need to draw
Brief blurb, My skill in .net has been called innovative but I would prefer
To keep things brief I need to direct you to my website. Please visit
I have read many articles regarding layout, but I am still quitely confused. My

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.