hello,
I'm writing my own web server that take a query and respond with the page;
It seems OK. FF nothing console errors.
Problem is when I tried to include in my file html a file "javas.js": FF gets strange error as:
I tried to do javas.js empty: the same error: where can be the error?
However: the content in the page appear properly (only I'd like include a js. to do other thing)
thanks
I'm writing my own web server that take a query and respond with the page;
It seems OK. FF nothing console errors.
Problem is when I tried to include in my file html a file "javas.js": FF gets strange error as:
Code:
Error: missing ; before statement Source Code: http://localhost/javas.js Row: 1, Column: 5 Source Code: 200 Document Follows
Code:
<html>
<head>
<script language="javascript" src="javas.js"> </script> //without this all is ok
<script>
function myFunc () {
for (var i=0; i < 100; i++) {
var table = document.getElementById("intro");
var row = document.createElement("tr");
var cell = document.createElement("td");
var link = document.createElement("a");
link.setAttribute("href", "http://www.google.com");
var linkText = document.createTextNode(" HI ");
link.appendChild(linkText);
cell.appendChild(link);
row.appendChild(cell);
table.appendChild(row);
}
}
</script>
</head>
<body onload="myFunc()">
<table style="width: 100%" border="5" >
<tr><td> Rsult </td> </tr>
<tbody id="intro"> </tbody>
</table>
</body>
</html>
thanks
Comment