I made the following code:
<html>
<head>
<title> AJAX 1 </title>
<script type="text/javascript">
var http;
if (window.XMLHttpRequest){
http= new XMLHttpRequest();
} else {
http= new ActiveXObjec("Microsoft.XMLHTTP");
}
</script>
</head>
<body>
<h1> AJAX 1 </h1>
<div id="txt"> </div>
<script type="text/javascript">
http.open("GET", "http://www.google.com/webhp?hl=en&q=google", 0);
http.send();
document.getElementById("txt").innerHTML= http.responseText;
</script>
</body>
</html> but it says something about an uncaught exception, when I test it in Firefox. What's wrong?


Sign In
Create Account


Back to top










