in my index.html page i have the following code:
[CODE]
<html>
<body>
<table border=”0″ >
<tr >
<td valign=”top” align=”left”>
<script type=”text/javascript” src=”test.js”></script>
</td>
<td valign=”top” id =”test”>
</td>
</tr>
</table>
</body>
</html>
in the left cell of the table a menu is included with <script type=”text/javascript” src=”test.js”></script>
test.js contains a menu with for example this link:
<a href=”#” onclick=”setPage(‘multimedia’)”><span class=”style2″>:::Multimedia</span></a></td></tr>’);
when clicked on this link the setPage() function is called and the multimedia page should be loaded in the right cell of the table.
The function is as followed :
function setPage(f) {
if(f == “multimedia”) {
var cell = document.getElementById(“test”);
cell.innerHTML = “<script src=’test2.js’> </script>”;
}
}
My problem is that cell.innerHTML = “<script src=’test2.js’> </script>”; doesn’t work. Does somebody know what I do wrong ? please help!