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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T15:34:31+00:00 2026-06-10T15:34:31+00:00

I have an AJAX function that reloads the current page. Now I don’t want

  • 0

I have an AJAX function that reloads the current page. Now I don’t want to reload the whole page, is it possible to get for example the innerHTML of div#footer in http.responseText?
What I actually want to do is:

document.getElementById("footer").innerHTML = http.responseText.getElementById("footer");

But of course it’s not possible like that, and I don’t want to rewrite the whole page that for example it only prints out the footer if a GET variable exists..
Any ideas? 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-06-10T15:34:33+00:00Added an answer on June 10, 2026 at 3:34 pm

    XMLHttpRequest it and parse it as a string?

    h=http.responseText;
    s1=h.substring(h.indexOf('<div id="footer"'));
    s1=s1.substring(s1.indexOf('>')+1);
    s1=s1.substring(0,s1.indexOf('</div>'));
    document.getElementById("footer").innerHTML=s1
    

    there

    but if you have any more divs in footer this will grab it until the next div’s end – create a new div after footer’s </div> e.g.: </div><div id="end"></div>

    and instead of

    s1=s1.substring(0,s1.indexOf('</div>'));
    

    do:

    s1=s1.substring(0,s1.indexOf('</div><div id="end">'));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two function, one function is a reload function that does a ajax
I have here an ajax function that reloads captcha images.. $('#reload_captcha').click(function(event){ $('#captcha_image').attr('src', $('#captcha_image').attr('src')+'#'); });
I have a jquery-ajax function that sends data to a php script and the
I have a javascript function that calls a generic function to make an ajax
I have an ajax call that fires multiple times but is called once. function
I have two Ajax calls. I need to make sure that a JS function
I have the following code that works on Firefox and Chrome $("#adicionarItem").click(function(){ $.ajax({ type:
I have a div that is created by Ajax with .append(html) function, I'm trying
I have an AJAX function inside a javascript file and I want it to
I have some code (written by another developer) that is doing AJAX page loading

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.