How can I make a layer popup at a random location on screen ???
Thx
GoPo
---------------------------------------
Thx
GoPo
---------------------------------------
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<script language="javascript">
function randomizeDiv(sID)
{ oDiv = document.getElementById( sID );
oDiv.style.left = Math.floor(Math.random() *(document.body.clientWidth-oDiv.offsetWidth)) ;
oDiv.style.top = Math.floor(Math.random() *(document.body.clientHeight-oDiv.offsetHeight)) ;
oDiv.style.visibility = "visible";
}
</script>
<body onload="randomizeDiv('popupdiv')">
...
<div id="popupdiv" style="position: absolute; height: 100px; width: 200px; border: solid #666699 1px; visibility: hidden;">
Blah blah blah
</div>