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

New No-Code Track! 🚀 New videos dropping every week—start learning today!

🌟 Dreaming of a bright future? 🎓 Ask about the Treehouse Scholarship program! 🚀

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

  • Treehouse Logo
  • Plans
    Chevron
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
  • Library
    Chevron
    • All Courses
    • Tracks
    • College Credit
  • Techdegree
    Chevron
    • Overview
    • Front End Development
    • Full Stack JavaScript
    • Data Analysis
    • UX Design
    • Python
  • Community
    Chevron
    • Community Projects
    • Live Sessions
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
  • Resources
    Chevron
    • Career Toolbox
    • CodeForward
    • Free Treehouse Near Me
    • Jobs
    • Blog
    • Support
    • About
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks College Credit
  • Overview Front End Web Development Full Stack JavaScript Python Development Data Analysis UX Design
  • Community Projects Live Sessions Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Career Toolbox CodeForward Free Treehouse Near Me Jobs Blog Support About
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • Android
      • • 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
  • 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
    308 Points

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

    Posted August 2, 2021 4:05pm by Sardar Ahmed Khan
    Sardar Ahmed Khan
    308 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.

    Treehouse

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

See Full Catalogue

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
  • Python Development
  • Data Analysis
  • UX Design

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
  • ...see more

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
  • ...see more

Explore

  • Plans
  • Affiliates
  • Perks
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
Terms & Conditions | Privacy

© 2025 Treehouse Island, Inc.