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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:04:52+00:00 2026-05-18T04:04:52+00:00

Problem I am making ajax call to server1 i.e. csce and once I got

  • 0

Problem I am making ajax call to server1 i.e. csce and once I got the response I am sending the response as contents to server2 i.e.yahoo server after getting response from there I want to refresh the page or atleast redirect it to the same page. Both ajax calls are working fine. The contents I am sending are also saved the only problem is that I have to manually refresh the page to see the changes. I want to refresh the page once the contents are saved on yahoo. I tried reload and redirect commands in success function of yahoo. But nothing works. I can see the both ajax calls in the HTTPfox but not the redirect.

The url from which i am making calls is different from the url where contents are saved thats why I need to refresh the page to see the changes. i.e. I am saving in yahoo/save while sending contents and seeing changes at yahoo/edit.

I am not sure where I am going wrong. Here is my code I am using. Can anyone suggest where I am going wrong. If my problem is not clear kindly do ask me to clarify more. Thanks.

This code is the code:

 function handleButtonClick()
{
// Declare the variables we'll be using
var xmlHttp, handleRequestStateChange;

   // Define the function to be called when our AJAX request's state changes:
handleRequestStateChange = function()
{
    // Check to see if this state change was "request complete", and
    // there was no server error (404 Not Found, 500 Server Error, etc)
    if (xmlHttp.readyState==4 && xmlHttp.status==200) 
    {
        var substring=xmlHttp.responseText;

        alert(substring);// I am able to see the text which is returned by the server1 i.e csce
var handleSuccess = function(o)
 {
   if(o.responseText !== undefined)
   {
     console.log(o.responseText);
 **window.location.reload()** // also I tried to redirect it to the same site but that also not works


  }
 };
var callback ={ success:handleSuccess,  failure: function(x) {
console.error(x) }, argument: ['foo','bar']};
var request = YAHOO.util.Connect.asyncRequest('POST','http://yahoo.com******', callback, substring);

    }
}

xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", "http://cse*****id=c6c684d9cc99476a7e7e853d77540ceb", true);
xmlHttp.onreadystatechange = handleRequestStateChange;
xmlHttp.send(null);
 }
  • 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-18T04:04:53+00:00Added an answer on May 18, 2026 at 4:04 am

    Do you just want to display the content in your page? Why don’t you try something along the lines of document.getElementById('divID').innerHTML = xmlHttp.responseText;?

    With divID being the id of a div that you want to fill the content with.

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

Sidebar

Related Questions

I have a very strange problem. I'm making a pretty standard ajax-call with jQuery,
I insert a record into the database by making an async AJAX call. After
I'm making an AJAX call which returns XML data, and this is my 'success:'
I am having a strange problem. There are two ajax calls in the code.
I'm having some problems with an ajax autocomplete field. I did the same thing
I am making an iFrame application for Facebook using the Facebook C# SDK. I
This might spund a little bit funny, didn't even know how to put the
I have an ASP .NET Web Forms application that makes use of the 'WebMethod'
On the execution of onclick or onselect event which have more precedence. Is it

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.