fpcreator2000
March 19th, 2007, 04:46
First of all, thank you to the DCemu crew for all of the emulation goodness that you brought ot my dreamcast and psp (especially the psp). Thank you very much.
I'm an aspiring web designer/developer, and I've run into a problem. I'm studying from this Ajax book, and as soon as I run the code for chapter 1, it throws me an error "access denied". here is the source code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Ajax at work</title>
<script type="text/javascript">
//<![CDATA[
var XMLHttpRequestObject = false;
if (window.XMLHttpRequest) {
XMLHttpRequestObject = new XMLHttpRequest();
} else if (window.ActiveXObject) {
XMLHttpRequestObject = new ActiveXObject("Microsoft.XMLHTTP");
}
function getData(dataSource, divID)
{
if(XMLHttpRequestObject) {
var obj = document.getElementById(divID);
XMLHttpRequestObject.open("GET", dataSource);
XMLHttpRequestObject.onreadystatechange = function()
{
if (XMLHttpRequestObject.readyState == 4 &&
XMLHttpRequestObject.status == 200) {
obj.innerHTML = XMLHttpRequestObject.responseText;
}
}
XMLHttpRequestObject.send(null);
}
}
//]]>
</script>
</head>
<body>
<h1>Fetching data with Ajax</h1>
<form action="">
<input type="button" value="Display Message" onclick="getData('data.txt', 'targetDiv');" />
</form>
<div id="targetDiv">
<p>The fetched data will go here.</p>
</div>
</body>
</html>
------------------------------------
ERROR:
Internet Explorer throws me this "access denied" error.
Line: 20
Char: 11
Error: Access is denied
Code: 0
URL: file:///H:/Documents/Ajax/AjaxVBCombined/ch01/index.tml
------------------------------------
Any and all comments are welcomed. BTW, The Javascript is turned on. I tested this program on IE, and on Firefox.
I'm an aspiring web designer/developer, and I've run into a problem. I'm studying from this Ajax book, and as soon as I run the code for chapter 1, it throws me an error "access denied". here is the source code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Ajax at work</title>
<script type="text/javascript">
//<![CDATA[
var XMLHttpRequestObject = false;
if (window.XMLHttpRequest) {
XMLHttpRequestObject = new XMLHttpRequest();
} else if (window.ActiveXObject) {
XMLHttpRequestObject = new ActiveXObject("Microsoft.XMLHTTP");
}
function getData(dataSource, divID)
{
if(XMLHttpRequestObject) {
var obj = document.getElementById(divID);
XMLHttpRequestObject.open("GET", dataSource);
XMLHttpRequestObject.onreadystatechange = function()
{
if (XMLHttpRequestObject.readyState == 4 &&
XMLHttpRequestObject.status == 200) {
obj.innerHTML = XMLHttpRequestObject.responseText;
}
}
XMLHttpRequestObject.send(null);
}
}
//]]>
</script>
</head>
<body>
<h1>Fetching data with Ajax</h1>
<form action="">
<input type="button" value="Display Message" onclick="getData('data.txt', 'targetDiv');" />
</form>
<div id="targetDiv">
<p>The fetched data will go here.</p>
</div>
</body>
</html>
------------------------------------
ERROR:
Internet Explorer throws me this "access denied" error.
Line: 20
Char: 11
Error: Access is denied
Code: 0
URL: file:///H:/Documents/Ajax/AjaxVBCombined/ch01/index.tml
------------------------------------
Any and all comments are welcomed. BTW, The Javascript is turned on. I tested this program on IE, and on Firefox.