Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6

Thread: cursor

  1. #1
    New Coder
    Join Date
    Mar 2005
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    cursor

    <area shape="rect" coords="228,142,362,200" alt="click" onmousedown="richDropDown()" nohref="#">

    how do I get the cursor to still display the hand to let people know it is a hotspot? If I use href it will shift the page around. If I use it like this it does not seem as if I am over a hotspot (just the regular arrow cursor).

    Thanks

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,033
    Thanks
    0
    Thanked 248 Times in 245 Posts
    <area shape="rect" coords="228,142,362,200" alt="click" onclick="richDropDown();return false" href="#">

    The "return false" there cancels the click action of the href, so the page will not scroll to the top when the hotspot is clicked.

  • #3
    New Coder
    Join Date
    Mar 2005
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    thanks

    thanks glenngv

  • #4
    New Coder
    Join Date
    Mar 2005
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    I guess it didn't work

    I guess this didn't work. The window still moves up to the top of the page:

    <area shape="rect" coords="228,142,362,200" alt="click" onclick="richDropDown();return false" href="#">

    The "return false" there cancels the click action of the href, so the page will not scroll to the top when the hotspot is clicked.

    Didn't work. I think the best way would be to use an onmouseover="function icon()" and difine my own Icon.

    Does anyone have any ideas?

  • #5
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    do u have a link to the page? it would be nice for us to see it in action so we can test out possible solutions

  • #6
    New Coder
    Join Date
    Mar 2005
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by _Aerospace_Eng_
    do u have a link to the page? it would be nice for us to see it in action so we can test out possible solutions
    I'm sorry I don't have a link... it's an internal page, but here is my code. It isn't much::

    <html>
    <head>
    <title>MY popup menu</title>

    <script>
    var oPopup = window.createPopup();
    function richDropDown()
    {
    oPopup.document.body.innerHTML = oContextHTML.innerHTML;
    oPopup.show(228, 280, 305, 100, dropdowno);
    //oPopup.show(0, 28, 305, 100, dropdowno);
    }
    </script>
    </head>
    <body>
    <h1>Heading</h1>

    <BR>
    <hr size="1">
    <b style="width:550px">2. Custom Menus</b>
    <br>
    <div style="">My Text</div>
    <br>
    <div id="dropdowno" style="background:#3366CC; padding:5px; border-bottom:1px solid black;
    border-top:1px solid #99CCFF; font:bold 10pt tahoma; color:white; width:300px" >
    <span style="cursor:hand; margin-left:5px; margin-right:10px;" onmousedown="richDropDown()" >
    Click here for a custom drop-down&nbsp; <img src="../../../../graphics/UI_droparrow.gif"
    align="absmiddle" style=""></span></div>
    <p><BR>
    </p>
    <p><img src="Picture1.gif" width="800" height="600" border="0" usemap="#Map">

    <map name="Map">
    <area shape="rect" coords="228,142,362,200" alt="click" onmousedown="richDropDown();return false() "href="#" >
    <area shape="rect" coords="91,275,171,316" href="" target="_blank" alt="">
    </map>

    </p>
    <DIV ID="oContextHTML" STYLE="display:none;">
    <div style="position:absolute; top:0; left:0; overflow:scroll; overflow-x:hidden; width:300; height:100; scrollbar-base-color:#3366CC; border-bottom:2px solid black; SCROLLBAR-HIGHLIGHT-COLOR: #99CCFF; SCROLLBAR-ARROW-COLOR: white;" >
    <DIV onmouseover="this.style.filter='progidXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#99ccff, EndColorStr=#FFFFFF)';"
    onmouseout="this.style.filter='';"
    STYLE="font-family:verdana; font-size:70%; height:25px; background:#e4e4e4; border:1px solid black; padding:3px; padding-left:20px; cursor:hand; filter:;">
    <SPAN ONCLICK="parent.location.href='http://msdn.microsoft.com'">
    Custom Drop-Down Item 1</SPAN>
    </DIV>
    <DIV onmouseover="this.style.filter='progidXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=yellowgreen, EndColorStr=#FFFFFF)';"
    onmouseout="this.style.filter='';"
    STYLE="font-family:verdana; font-size:70%; height:25px; background:#e4e4e4; border:1px solid black; padding:3px; padding-left:20px; cursor:hand; border-top:0px solid black">
    <SPAN ONCLICK="parent.location.href='http://search.microsoft.com'">
    Custom Drop-Down Item 2</SPAN>
    </DIV>
    <DIV onmouseover="this.style.filter='progidXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=gold, EndColorStr=#FFFFFF)';"
    onmouseout="this.style.filter='';"
    STYLE="font-family:verdana; font-size:70%; height:25px; background:#e4e4e4; border:1px solid black; padding:3px; padding-left:20px; cursor:hand; border-top:0px solid black">
    <SPAN ONCLICK="parent.location.href='http://search.microsoft.com'">
    Custom Drop-Down Item 3</SPAN>
    </DIV>
    <DIV onmouseover="this.style.filter='progidXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=violet, EndColorStr=#FFFFFF)';"
    onmouseout="this.style.filter='';"
    STYLE="font-family:verdana; font-size:70%; height:25px; background:#e4e4e4; border:1px solid black; padding:3px; padding-left:20px; cursor:hand; border-top:0px solid black">
    <SPAN ONCLICK="parent.location.href='http://search.microsoft.com'">
    Custom Drop-Down Item 4</SPAN>
    </DIV>
    <DIV onmouseover="this.style.filter='progidXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#99ccff, EndColorStr=#FFFFFF)';"
    onmouseout="this.style.filter='';"
    STYLE="font-family:verdana; font-size:70%; height:25px; background:#e4e4e4; border:1px solid black; padding:3px; padding-left:20px; cursor:hand; border-top:0px solid black">
    <SPAN ONCLICK="parent.location.href='http://search.microsoft.com'">
    Custom Drop-Down Item 5</SPAN>
    </DIV>
    </div>
    </DIV>

    </body>
    </html>



    I am looking mainly under the <Map> area. If you could answer any of my other questions like:
    1.)can I hide my menus in a different file and still use them on this page?
    2.)would an onmouseover="custom_icon function()" be good and how to do it? ;
    3.)I am planning on having multiple menus to different hotspots would it be best to capture the mouse location and send the location parameters to a js function and use a case selection to choose the menu and location to display.


  •  

    Posting Permissions

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