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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:49:46+00:00 2026-05-30T18:49:46+00:00

Given below is the simplest script I put together to test XMLHttpRequest. But, no

  • 0

Given below is the simplest script I put together to test XMLHttpRequest. But, no matter what I do, I don’t seem to be able get it working. It ALWAYS results in error after headers are received. One of the possibility is that it’s because of proxy. If it is how can I know that’s the cause? Please note the code for XMLHttpRequest is taken from guide at https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest

<html lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script type="text/JavaScript">

function loadXMLDoc()
{

var oXHR = new XMLHttpRequest();

oXHR.onreadystatechange = function (oEvent) {
  if (oXHR.readyState === 4) {
    if (oXHR.status === 200) {
      document.getElementById("xml_req_output").innerHTML += oXHR.responseText + "\n";
    } else {
      document.getElementById("xml_req_output").innerHTML += "Error:" + oXHR.statusText  + "\n";
    }
  }
}

if ( typeof oXHR.overrideMimeType != 'undefined') {
   oXHR.overrideMimeType('text/xml');
}

var urltoget = document.getElementById("txturl").value;

document.getElementById("xml_req_output").innerHTML += urltoget + "\n";

oXHR.open("GET", urltoget, true);
oXHR.send(null);

}

</script>
</head>
<body>
<input type="text" name="txturl" id="txturl" size="200" value="http://www.mozilla.org"/>
</br>
<input type="button" onclick="loadXMLDoc()" value="Get XML"/>
</br>
<textarea cols="100" rows="50" height="400px" id="xml_req_output" >
</textarea>
</body>
</html>
  • 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-30T18:49:47+00:00Added an answer on May 30, 2026 at 6:49 pm

    You cannot load documents by XMLHttpRequest from diffent domains. See also the same origin policy.

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

Sidebar

Related Questions

Technology Used:- Asp.Net 2.0 Code:- See Below Description:- hello code given below is working
Using the code given below the padding doesn't seem to be playing as it
If logic given below works well in C language but it doesn't work in
The test case given below shows a simple case where I have 2 parameters
Update progress not working.The code is given below,When i am clicking on any button
The code given below shows a Stackoverflow error when run.But if I make another
Given the one-table design given below how would the following best be queried The
I have the HTML given below: <ul id=thumbsPhotos> <li src=/images/1alvaston-hall-relaxing-lg.jpg onclick=updatePhoto (this.title)><img src=/images/1alvaston-hall-relaxing-sl.jpg width=56
I have a xml given below: <root title=الصفحة الرئيسة> <item title=الصفحة الرئيسة itemuri=tcm:8-29-4 ShowInNav=True
Hello friends i am running code given below which contains the setLogTimeEntery function and

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.