Results 1 to 3 of 3

Thread: Changing the mouse pointer.... -[RESOLVED]-

  1. #1

    Thread Starter
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349

    Changing the mouse pointer.... -[RESOLVED]-

    I'm wanting to be able to chnage the mouse pointer to the hand icon when it hovers over a cell in a table. So far I have:
    Code:
    <td onMouseOver="this.style.cursor='hand';" .....
    The thing is that this only works for IE, is there a way to do this in HTML/javascript properly? (i.e in FireFox too)

    Thanx
    Last edited by Electroman; Jul 4th, 2004 at 08:54 AM.
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    The proper standard way is CSS:
    cursor: pointer;

    That doesn't work in IE5 though because, well, it's IE...
    IE 5 only understands hand, all non-IE only pointer, IE 6 both. The proper way of doing it for all browsers (doesn't validate):
    cursor: pointer;
    cursor: hand;

    Ok, the hard part is making this a dynamic change. Two ways: one is browser detection, the other is changing the td's className property to assign a CSS class.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349
    Thats fine thanx, working in IE6 & FF is good for me .
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width