Elcid32
07-24-2006, 10:39 PM
Hello forum:
Being new to Javascript this may seem a silly question for the experts; however, please humor me :o
Can anyone tell me what is "technically" wrong with this code:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="./styles/vmstyle.css" rel="stylesheet" type="text/css">
<link href="./styles/vmgrid.css" rel="stylesheet" type="text/css">
<link>
<script src="./includes/vmfunctions.js" type="text/javascript"></script>
</head>
<body>
<script>
function vmGrid_buildDataSet(){
//getHTTPObject Function Defined In vmfunctions.js
var http = getHTTPObject();
http.onreadystatechange=function(){
if(http.readystate==4 && http.status==200){
document.getElementByID("testDiv").innerHTML = http.responseText;
}
}
http.open('GET',"cptbrwld.php",true);
http.send(null);
}
</script>
<div id="testDiv"></div>
<script>vmGrid_buildDataSet();</script>
</body>
</html>
------------------------
The problem I am getting is that Javascript is throwing an error on the assignment of the innerHTML line (Object does not support this property or method). I am pulling my hair out here. Thanks.
Shawn S.
Being new to Javascript this may seem a silly question for the experts; however, please humor me :o
Can anyone tell me what is "technically" wrong with this code:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="./styles/vmstyle.css" rel="stylesheet" type="text/css">
<link href="./styles/vmgrid.css" rel="stylesheet" type="text/css">
<link>
<script src="./includes/vmfunctions.js" type="text/javascript"></script>
</head>
<body>
<script>
function vmGrid_buildDataSet(){
//getHTTPObject Function Defined In vmfunctions.js
var http = getHTTPObject();
http.onreadystatechange=function(){
if(http.readystate==4 && http.status==200){
document.getElementByID("testDiv").innerHTML = http.responseText;
}
}
http.open('GET',"cptbrwld.php",true);
http.send(null);
}
</script>
<div id="testDiv"></div>
<script>vmGrid_buildDataSet();</script>
</body>
</html>
------------------------
The problem I am getting is that Javascript is throwing an error on the assignment of the innerHTML line (Object does not support this property or method). I am pulling my hair out here. Thanks.
Shawn S.