Change of mouse pointer is only visible if I move the mouse

Discussion in 'Javascript' started by Stefan Mueller, Jan 28, 2006.

  1. With the following code I can change the mouse pointer. However, if you
    click in Mozilla (with IE it works perfect) on 'Show hourglass' the mouse
    pointer changes only if you move the mouse at least on pixel.

    <html>
    <body>
    <script type = 'text/javascript'>
    function show_hourglass() {
    document.getElementById("my_href1").style.cursor = "wait";
    document.getElementById("my_href2").style.cursor = "wait";
    }

    function show_hand() {
    document.getElementById("my_href1").style.cursor = "default";
    document.getElementById("my_href2").style.cursor = "default";
    }
    </script>

    <a href = "javascript:show_hourglass();" id = "my_href1">Show
    hourglass</a>
    <br>
    <a href = "javascript:show_hand();" id = "my_href2">Show hand</a>
    </body>
    </html>

    Is there any workaround? E.g. to move the mouse one pixel by javascript?
    Stefan
     
    Stefan Mueller, Jan 28, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. spamfurnace
    Replies:
    1
    Views:
    2,638
    Scott M.
    May 24, 2004
  2. tshad

    button visible/not visible

    tshad, Oct 26, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    4,451
    Brian Hoops
    Oct 28, 2004
  3. tshad

    Sections visible and not visible

    tshad, Jan 31, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    2,065
    tshad
    Jan 31, 2005
  4. Patrick Olurotimi Ige
    Replies:
    7
    Views:
    5,976
    Patrick Olurotimi Ige
    Jun 15, 2005
  5. tshad
    Replies:
    1
    Views:
    4,262
    tshad
    Oct 31, 2009
Loading...

Share This Page