image map need to change the cursor to finger

javascript United States
  • 18 years ago

    I have this image map and I need to change the cursor to finger on mouse over:


    <map name="Map" >
    <area shape="rect" coords="0,61,121,140" onClick="scrvalid(1)">
    <area shape="rect" coords="175,101,445,204" onClick="scr
    valid(0)" >
    </map>


    Adding href (<area shape="rect" coords="175,100,445,203" onClick="scr_valid(0)" href="#" >) does not work. Any body could help please?
    Should work in IE4+
    Thank you.

  • 18 years ago

    heres my tutorial on image maps


    http://www.hjones.freeuk.com/imagemaps.htm



    the pic dont work, dont knowy  think on wrong server, but ulll ce if u mover over the image in places the curser changes, hope this is usefull

  • 18 years ago

    Thank you. Nice tutorial
    What I am trying to do is to call the scr_valid(0) function on image map while changing the cursor to hand:


    <area shape="rect" coords="0,61,121,140" style="cursor:default" onClick="scr_valid(1)" onmouseover="this.style.cursor='hand'" >  


    ...but this thing still does not work.


  • 18 years ago

    hmmm ill have a look around, but y have u got this in there style="cursor:default"  perhaps this is stopping the this.style routine ???

  • 18 years ago

    Well first I did not use style="cursor:default" (just onmouseover="this.style.cursor='hand'") and it did not work, so I thought I should set the defeult style first, still does not work..

  • 18 years ago

    you're putting the style bit in the wrong place, that's why it won't work. the style bit goes as an attribute of an element, not as the result of an action


    so do something like this:


    Code:
    <area style="cursor:hand;">


    and it should all be fine and dandy.

  • 18 years ago

    Quote:
    [1]Posted by paulfp on 8 Aug 2002 02:43 PM[/1]
    you're putting the style bit in the wrong place, that's why it won't work. the style bit goes as an attribute of an element, not as the result of an action


    so do something like this:


    Code:
    <area style="cursor:hand;">



    Unfortunatly it did not work. Thank you though.

  • 18 years ago

    what browser and version are you using?

  • 18 years ago

    We are on Intranet using IE4+

  • 18 years ago

    can you give me the entire html document and i'll have a look at it for you

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“A computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are, in short, a perfect match” - Bill Bryson