Skip to main content

Notice: Workspaces are undergoing maintenance and are temporarily unavailable.

🚀 In our NEW AI Bootcamp you'll build a working app in 28 days, no experience required. Free to all subscription levels.

✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

Join the Treehouse affiliate program and earn 25% recurring commission! 🤑

  • Treehouse Logo
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
    • All Courses
    • Tracks
    • AI Bootcamp
    • College Credit
    • Techdegree Bootcamps
    • Front End Development
    • Full Stack JavaScript
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
    • Explore
    • Career Toolbox
    • Free Treehouse Near Me
    • Affiliates
    • Blog
    • Support
    • About
    • Learn
    • Beginner's Guide to Coding
    • Data Analysis with SQL & Python
    • Front-End Web Development
    • Python Programming Basics
    • Techdegree Bootcamp Overview
    • UX Design Fundamentals
    • AI Tools for Beginners
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks AI Bootcamp College Credit
  • Techdegree Bootcamps Front End Web Development Full Stack JavaScript
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Explore Career Toolbox Free Treehouse Near Me Affiliates Blog Support About
    Learn Beginner's Guide to Coding Data Analysis with SQL & Python Front-End Web Development Python Programming Basics Techdegree Bootcamp Overview UX Design Fundamentals AI Tools for Beginners
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
Loading banner... Start your free trial at Treehouse
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
      • • Vibe Coding
  • Clint Travis
    Clint Travis
    5,112 Points

    Can't get passed this error: "Bummer: To select the <div> tag with the 'sidebar' ID, you need to pass the ID name as"

    Posted June 2, 2025 2:49pm by Clint Travis
    Clint Travis
    5,112 Points
    • JavaScript
    • AJAX Basics
    • Programming AJAX
    • Check for the correct ready state

    1 Answer

  • Michael MacKenzie
    Michael MacKenzie
    8,633 Points

    Now use a DOM element's innerHTML property to set the HTML inside the sidebar div to the server's response.

    Posted June 23, 2024 12:41am by Michael MacKenzie
    Michael MacKenzie
    8,633 Points
    • JavaScript
    • AJAX Basics
    • Programming AJAX
    • Check for the correct ready state

    1 Answer

  • Fabiola Barrientos
    Fabiola Barrientos
    9,467 Points

    I dont know what to do

    Posted December 2, 2021 5:25pm by Fabiola Barrientos
    Fabiola Barrientos
    9,467 Points
    • JavaScript
    • AJAX Basics
    • Programming AJAX
    • Check for the correct ready state

    2 Answers

  • Sardar Ahmed Khan
    Sardar Ahmed Khan
    309 Points

    code for handling response. I am getting the syntax error?

    Posted August 2, 2021 4:05pm by Sardar Ahmed Khan
    Sardar Ahmed Khan
    309 Points
    • JavaScript
    • AJAX Basics
    • Programming AJAX
    • Check for the correct ready state

    1 Answer

  • Jedidiah Jawi
    Jedidiah Jawi
    7,047 Points

    Now that the server has responded with the data, you need to add it to the page. First select the div with the ID of 'si

    Posted June 7, 2021 10:01pm by Jedidiah Jawi
    Jedidiah Jawi
    7,047 Points
    • JavaScript
    • AJAX Basics
    • Programming AJAX
    • Check for the correct ready state

    1 Answer

  • Alonzo Delk
    Alonzo Delk
    6,991 Points

    I need help adding a conditional statement

    Posted June 5, 2021 1:54pm by Alonzo Delk
    Alonzo Delk
    6,991 Points
    • JavaScript
    • AJAX Basics
    • Programming AJAX
    • Check for the correct ready state

    1 Answer

  • Marquis Briggs
    Marquis Briggs
    8,967 Points

    Add a conditional statement inside the onreadystatechange event handler that tests to make sure the server has sent back

    Posted June 4, 2021 1:15pm by Marquis Briggs
    Marquis Briggs
    8,967 Points
    • JavaScript
    • AJAX Basics
    • Programming AJAX
    • Check for the correct ready state

    2 Answers

  • Joanna Saturn
    Joanna Saturn
    6,451 Points

    I'm not sure what I'm doing wrong...receiving error around using innerHTML

    Posted February 16, 2021 9:19pm by Joanna Saturn
    Joanna Saturn
    6,451 Points
    • JavaScript
    • AJAX Basics
    • Programming AJAX
    • Check for the correct ready state

    1 Answer

  • trottly
    trottly
    5,394 Points

    Using `querySelector('#sidebar')` instead of `getElementById('sidebar')

    Posted February 14, 2021 8:20pm by trottly
    trottly
    5,394 Points
    • JavaScript
    • AJAX Basics
    • Programming AJAX
    • Check for the correct ready state

    1 Answer

  • Roberto Nieves
    Roberto Nieves
    9,902 Points

    How can I use a DOM element's innerHTML property to set the HTML inside the sidebar div to the server's response?

    Posted November 27, 2020 7:05pm by Roberto Nieves
    Roberto Nieves
    9,902 Points
    • JavaScript
    • AJAX Basics
    • Programming AJAX
    • Check for the correct ready state

    0 Answers

  • Steve Fau
    Steve Fau
    5,622 Points

    document.querySelector('#sidebar') not accepted as a valid solution.

    Posted October 1, 2020 6:29pm by Steve Fau
    Steve Fau
    5,622 Points
    • JavaScript
    • AJAX Basics
    • Programming AJAX
    • Check for the correct ready state

    1 Answer

  • Jonathan Ambriz
    PLUS
    Jonathan Ambriz
    Courses Plus Student 3,902 Points

    Add a conditional statement inside the onreadystatechange event handler that tests to make sure the server has sent back

    Posted September 8, 2020 7:01pm by Jonathan Ambriz
    Jonathan Ambriz
    Courses Plus Student 3,902 Points
    • JavaScript
    • AJAX Basics
    • Programming AJAX
    • Check for the correct ready state

    1 Answer

  • Alexandru Pescaru
    Alexandru Pescaru
    6,410 Points

    what am i doing here wrong...

    Posted August 2, 2020 4:01pm by Alexandru Pescaru
    Alexandru Pescaru
    6,410 Points
    • JavaScript
    • AJAX Basics
    • Programming AJAX
    • Check for the correct ready state

    0 Answers

  • conflictingcode
    conflictingcode
    11,223 Points

    I completed this fairly easily but why doesn't it allow the student to use an arrow function or querySelector()?

    Posted August 2, 2020 7:49am by conflictingcode
    conflictingcode
    11,223 Points
    • JavaScript
    • AJAX Basics
    • Programming AJAX
    • Check for the correct ready state

    0 Answers

  • Christopher Evans
    Christopher Evans
    9,896 Points

    Checking for ready state - code should work

    Posted January 20, 2020 3:58pm by Christopher Evans
    Christopher Evans
    9,896 Points
    • JavaScript
    • AJAX Basics
    • Programming AJAX
    • Check for the correct ready state

    1 Answer

  • Steven mudie
    Steven mudie
    5,523 Points

    this thing is broken

    Posted January 9, 2020 2:26pm by Steven mudie
    Steven mudie
    5,523 Points
    • JavaScript
    • AJAX Basics
    • Programming AJAX
    • Check for the correct ready state

    1 Answer

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
SEE ALL

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
SEE ALL

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
SEE ALL

About Us

  • About
  • Blog
  • Community
  • Stories
  • Contact
  • Gift Card

Explore

  • Plans
  • Affiliates
  • Perks
  • Shop
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses

Treehouse is an online technology education platform founded in 2011. Treehouse offers more than 700 self-paced, video-based courses in web development, programming, data analysis, design, and AI, plus two project-based bootcamp programs in Front End Web Development and Full Stack JavaScript. Individual Treehouse plans start at $25 per month and include a 7-day free trial. Treehouse serves individual learners, businesses, schools, and public libraries. Cardholders at participating U.S. public libraries can use Treehouse for free. Select Treehouse courses, offered with University Pathways International, are recommended for college credit by ACE and NCCRS. Treehouse learners earn digital certificates for completed Tracks.

Terms & Conditions · Privacy · © 2026 Treehouse Island, Inc.
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
  • Discord