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. Advertisements

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,832
    Scott M.
    May 24, 2004
  2. tshad

    button visible/not visible

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

    Sections visible and not visible

    tshad, Jan 31, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    2,254
    tshad
    Jan 31, 2005
  4. Oscar

    Change mouse pointer

    Oscar, Apr 15, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    3,466
    Andrew L. Van Slaars
    Apr 15, 2005
  5. Patrick Olurotimi Ige
    Replies:
    7
    Views:
    6,325
    Patrick Olurotimi Ige
    Jun 15, 2005
  6. tshad
    Replies:
    1
    Views:
    4,666
    tshad
    Oct 31, 2009
  7. Andrea Williams

    User control not visible when setting .Visible = true;

    Andrea Williams, Jan 26, 2004, in forum: ASP .Net Web Controls
    Replies:
    4
    Views:
    741
    Andrea Williams
    Jan 28, 2004
  8. Jurjen de Groot
    Replies:
    0
    Views:
    550
    Jurjen de Groot
    May 19, 2008
Loading...