Twango Posted January 29, 2010 Share Posted January 29, 2010 Why isnt this working:<!--Simple clock that will be at chosen location on the screen.Please either enter top, bottom, left, or right.For example, if you set Pos1 to Bottomand Pos2 to center, it would be bottom center,--><head><script type="text/javascript">/*Configure Below here*/var pos1="Bottom";var pos2="Center;document.getElementById('clock').style.pos1="0";</script></head><div id="clock" style="background-color:black;color:white;position:fixed"><b id="text"></b></div> Link to comment Share on other sites More sharing options...
jeffman Posted January 29, 2010 Share Posted January 29, 2010 Because there is no body tag?Because the script runs as the page loads, and the div doesn't exist when the script tries to get a reference to it? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.