I have a problem. This is my code:
HTML:
<div>
<div id="id" style="position:absolute;">
<img id="0" src="../FileTypes/mat.png" style="position:fixed;top:50px;left:25px;" />
</div>
</div>
JavaScript:
<script type="text/javascript">
var xsize = screen.width;
var ysize = screen.height;
document.getElementById('id').style.height = ysize + "px";
document.getElementById('id').style.width = xsize + "px";
</script>
And I have following error:
Does anybody know where have I error in my code and how can I repair it? Please help me.
The script is likely being executed before the DOM has been fully constructed. You should do one of the following:
jQuerywindow.onloadscriptjust before the</body>tag