Hello. I just started working on Javascript Includes to use on my website. I am trying to use them to place HTML Div layers on my website. I am having a little problem (or big depeding on how you look at it) problem with them. I have posted the coding that i have for both the Javascript file and the HTML file below. I have also given a link to what is created using this coding. What did I do wrong? I know I did or didn't do something but I can't figure what it it is. Please tell me what I did wrong. Is it a coding problem or is it just not possible to place Div layers using JSI? You can post the coding that I need for it to work, but I really don't care. If someone tells me what I did wrong I could probably figure it out myself. Thank you.
HTML file
Code:
<html>
<head>
<title> Games Galore </title>
<script language="JavaScript" src="tp.js"></script>
</head>
<body>
<div id=content style="position:absolute; width:200; height:375; padding:80px; background-color:#000000; overflow:auto;">
<img src="gglogo.jpg" alt="Games Galore">
</div>
</body>
</html>
Javascript Code
Code:
<script language="JavaScript">
document.write('<div id=header style="position:absolute; width:100%; height:75; padding:5px; background-color:#000000; overflow:auto;">');
document.write('<img src="gglogo.jpg" alt="Games Galore">');
document.write('</div>');
document.write('<div id=left style="position:absolute; width:50; height:300; padding:5px; background-color:#000000; overflow:auto;">');
document.write('<img src="gglogo.jpg" alt="Games Galore">');
document.write('</div>');
document.write('<div id=right style="position:absolute; width:50; height:300; padding:5px; background-color:#000000; overflow:auto;">');
document.write('<img src="gglogo.jpg" alt="Games Galore">');
document.write('</div>');
</script>
Result
Result of above code