The read-only XMLHttpRequest property responseText returns the text received from a server following a request being sent.
Questions tagged [responsetext]
161 questions
29
votes
10 answers
jquery ajax get responsetext from http url
Neither:
var response = $.ajax({
type: "GET",
url: "http://www.google.de",
async: false,
success : function() {
alert (this);
}
});
Nor:
var response2 = $.get("http://www.google.de", function(data) {
…
stephan
11
votes
4 answers
javascript: how to fetch the content of a web page
In JS is it possible to fetch the content of a web page assigning it to a variable?
For example, why the following toy code does not work?
var req = new XMLHttpRequest();
req.open('GET', 'http://www.google.com',…

tic
- 4,009
- 15
- 45
- 86
9
votes
3 answers
Why is responseText undefined here?
$.ajax({
url: 'http://jsonplaceholder.typicode.com/posts/1',
method: 'GET',
}).done(function(data){
console.log(data);
console.log(data.responseText);
});
Can anyone help me understand why console.log(data.responseText); is returning…

theclarkofben
- 425
- 2
- 6
- 18
8
votes
2 answers
returning xmlhttp responseText from function as return
im new in javascript and php , my goal is :RETURN string from xmlhttp responseText to a function return value.So i can use it with innerText or innerHTML method.
the html code :