Does this websit support AJAX?


I am trying to test Ajax does this website support Ajax.


It should do! :slight_smile:


Thank You for your reply. I am using the code below. It does not seem to change the text in data.txt.
Here is my code: Please let me know if you can help me.

<!DOCTYPE html>
	<title>Ajax Lesson</title>
		function getDataFromText(){
		var xmlhttp;
			xmlhttp = new XMLHtppRequest();
			xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");
			if(xmlhttp.readyState ==4 && xmlhttp.status==200){
<div id="data"><h2>Replace this text</h2></div>
<button type="button" onclick="getDataFromText()">Get Data</button>




Hi @pkn

Do you need to change the text of data.txt? or get data from it and print it?

Mention your website address too.


I think he wants to modify data in it.


Make sure you check your JavaScript console in your browser, and also your Network console. The JS console should have no errors, and the Network console will allow you to watch the request and response in real-time as your AJAX operation is made.

As @Supun says, if we can have a link, that will give us something to look at.


one minor typo;
Change XMLHtppRequest to XMLHttpRequest

			xmlhttp = new XMLHttpRequest();


Hi Supun,

Get data from the data.txt file and print it


Thank You for your help halfer


Thank You for your help Mortenrb, I will change that


Is your issue fixed now @pkn