change cursor when loading page

The way to do this is something like this:

On the first page (to show as soon as the link is clicked):

<a href="http://www.example.com/Page2.html" onclick="document.body.style.cursor="wait"; return true;">

On the second page (to show until the new page finishes loading):

<script type="text/javascript">
    // Set the cursor ASAP to "Wait"
    document.body.style.cursor="wait";

    // When the window has finished loading, set it back to default...
    window.onload=function(){document.body.style.cursor="default";}
</script>

Note that the page is loaded sequentially so the closer to the top of your second page the cursor="wait" line is, the less delay there will be in showing the cursor on the new page.

Leave a Comment

tech