global cursor change

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Vincent van Beveren

    global cursor change

    Hi everyone,

    For an webapp I'm writing I want to set the cursor on 'wait' globally on
    the page entire. In IE 6 I can do this by

    document.body.s tyle.cursor='wa it';

    However, Netscape 7 just seems to ignore that. Any ideas how I can make
    it work for both browsers?

    Thanks,
    Vincent

  • Grant Wagner

    #2
    Re: global cursor change

    Vincent van Beveren wrote:
    [color=blue]
    > Hi everyone,
    >
    > For an webapp I'm writing I want to set the cursor on 'wait' globally on
    > the page entire. In IE 6 I can do this by
    >
    > document.body.s tyle.cursor='wa it';
    >
    > However, Netscape 7 just seems to ignore that. Any ideas how I can make
    > it work for both browsers?
    >
    > Thanks,
    > Vincent[/color]

    <a href="#"
    onclick="docume nt.documentElem ent.style.curso r='wait';">Test </a>

    document.docume ntElement.style .cursor = 'wait'; works in IE, Firefox 0.9,
    Mozilla 1.6 and Opera 7.51. It should work in Netscape 7.01, but Netscape 7
    is based on a much earlier version of Mozilla, so it may contain bugs which
    keep it from correctly honoring the above.

    --
    | Grant Wagner <gwagner@agrico reunited.com>

    * Client-side Javascript and Netscape 4 DOM Reference available at:
    *


    * Internet Explorer DOM Reference available at:
    *
    Gain technical skills through documentation and training, earn certifications and connect with the community


    * Netscape 6/7 DOM Reference available at:
    * http://www.mozilla.org/docs/dom/domref/
    * Tips for upgrading JavaScript for Netscape 7 / Mozilla
    * http://www.mozilla.org/docs/web-deve...upgrade_2.html


    Comment

    • DU

      #3
      Re: global cursor change

      Vincent van Beveren wrote:
      [color=blue]
      > Hi everyone,
      >
      > For an webapp I'm writing I want to set the cursor on 'wait' globally on
      > the page entire. In IE 6 I can do this by
      >
      > document.body.s tyle.cursor='wa it';
      >
      > However, Netscape 7 just seems to ignore that. Any ideas how I can make
      > it work for both browsers?
      >
      > Thanks,
      > Vincent
      >[/color]

      FWIW,
      document.body.s tyle.cursor='wa it';
      works for me in NS 6.2 and I would be surprised if it was not working in
      NS 7.x

      DU

      Comment

      • Vincent van Beveren

        #4
        Re: global cursor change

        > For an webapp I'm writing I want to set the cursor on 'wait' globally on[color=blue]
        > the page entire. In IE 6 I can do this by
        >
        > document.body.s tyle.cursor='wa it';
        >
        > However, Netscape 7 just seems to ignore that. Any ideas how I can make
        > it work for both browsers?[/color]

        I found out, that it does work,however, it only works for all elements
        on the page. So, if I put some text in the body, and I move my cursor
        on the text, it does give a wait-cursor. But that is not exactly what
        I am looking for. Thanks everyone for giving it a try.

        Comment

        • Jim Ley

          #5
          Re: global cursor change

          On Wed, 16 Jun 2004 17:23:00 GMT, Grant Wagner
          <gwagner@agrico reunited.com> wrote:
          [color=blue]
          >document.docum entElement.styl e.cursor = 'wait'; works in IE, Firefox 0.9,
          >Mozilla 1.6 and Opera 7.51.[/color]

          What happens with elements with a specific cursor set? they would
          still be honoured wouldn't they?

          Jim.
          --
          comp.lang.javas cript FAQ - http://jibbering.com/faq/

          Comment

          • Grant Wagner

            #6
            Re: global cursor change

            Jim Ley wrote:
            [color=blue]
            > On Wed, 16 Jun 2004 17:23:00 GMT, Grant Wagner
            > <gwagner@agrico reunited.com> wrote:
            >[color=green]
            > >document.docum entElement.styl e.cursor = 'wait'; works in IE, Firefox 0.9,
            > >Mozilla 1.6 and Opera 7.51.[/color]
            >
            > What happens with elements with a specific cursor set? they would
            > still be honoured wouldn't they?
            >
            > Jim.[/color]

            Actually, now that I examine the behaviour a little more closely, although it
            does the same thing across all browsers, what it does is set the cursor for
            the documentElement , not any of the child elements on document.body, which is
            probably not the desired outcome.

            Ultimately, if the OP's requirements are to set the wait cursor on all
            elements, then the only way to be sure you've done that is to navigate through
            the entire DOM hierarchy setting .style.cursor = 'wait'; on all elements.

            --
            | Grant Wagner <gwagner@agrico reunited.com>

            * Client-side Javascript and Netscape 4 DOM Reference available at:
            *


            * Internet Explorer DOM Reference available at:
            *
            Gain technical skills through documentation and training, earn certifications and connect with the community


            * Netscape 6/7 DOM Reference available at:
            * http://www.mozilla.org/docs/dom/domref/
            * Tips for upgrading JavaScript for Netscape 7 / Mozilla
            * http://www.mozilla.org/docs/web-deve...upgrade_2.html


            Comment

            • Jim Ley

              #7
              Re: global cursor change

              On Mon, 21 Jun 2004 20:34:00 GMT, Grant Wagner
              <gwagner@agrico reunited.com> wrote:
              [color=blue]
              >Ultimately, if the OP's requirements are to set the wait cursor on all
              >elements, then the only way to be sure you've done that is to navigate through
              >the entire DOM hierarchy setting .style.cursor = 'wait'; on all elements.[/color]

              add an onmousemove event which changes the cursor to WAIT and pushes
              the element onto a stack, and when you want to go back, reset all the
              elements in the stack, should be better performance than iterating
              over them all.

              Jim.
              --
              comp.lang.javas cript FAQ - http://jibbering.com/faq/

              Comment

              Working...