Forum Moderators: open
When using DHTML and Javascript transitions eg fading in a picture the loading status at the base of the browser screen will often finish thus making a page that is still loading an image appear blank.
Is there a way of making the Mouse pointer an hourglass until the image is completely loaded?
Kind Regards
Rod
<script type="text/javascript">function Check_Img() {
if (document.getElementById('my-image').complete) {
clearInterval(img_timer)
document.body.style.cursor = ''
}
}
</script>
</head>
<body>
<script type="text/javascript">
document.body.style.cursor = 'wait'
</script>
<img id="my-image">
<script type="text/javascript">
img_timer = setInterval('Check_Img()', 250)
</script>
[msdn.microsoft.com...]
<style type="text/css">
body {
cursor: wait;
}
</style>
<script type="text/javascript">
function Check_Img() {
if (document.getElementById('my-image').complete) {
clearInterval(img_timer)
document.body.style.cursor = 'default'
}
}
</script>
</head>
<body>
<img id="my-image">
<script type="text/javascript">
img_timer = setInterval('Check_Img()', 250)
</script>