I copied an Ajax sample from http://www.w3schools.com/ajax/tryit.asp?filename=tryajax_first I saved the sample down as ajaxTest1.htm. When I run the sample (sample code below) I get the "Allow blocked content" message in the browser (IE) and I select "yes". The page comes up like the example (the example works fine) -- but nothing happens and I get the error icon at the left bottom corner of page that says:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB7.4; InfoPath.1; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.4506.2152; yie8)
Timestamp: Tue, 30 Oct 2012 23:10:09 UTC
Message: Access is denied.
Line: 23
Char: 1
Code: 0
URI: file:///C:/1B/Berlin/test/test2/ajaxTest1.htm
Here is the sample. I also created the "ajax_info.txt" that contains the two following lines of text (and saved as a .txt file in same directory/folder as ajaxTest1.htm):
AJAX is not a new programming language.
AJAX is a technique for creating fast and dynamic web pages.
------Am I missing an Ajax toolkit maybe?
<!DOCTYPE html>
<html>
<head>
<script>
function loadXMLDoc()
{
var xmlhttp;
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("myDiv").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET","ajax_info.txt",true);
xmlhttp.send();
}
</script>
</head>
<body>
<div id="myDiv"><h2>Let AJAX change this text</h2></div>
<button type="button" onclick="loadXMLDoc()">Change Content</button>
</body>
</html>