...

View Full Version : cursor



johns311
03-21-2005, 10:51 PM
<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

glenngv
03-22-2005, 02:15 AM
<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.

johns311
03-23-2005, 02:29 PM
thanks glenngv

johns311
03-23-2005, 02:54 PM
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?

_Aerospace_Eng_
03-23-2005, 02:59 PM
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

johns311
03-23-2005, 03:12 PM
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='progid:DXImageTransform.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='progid:DXImageTransform.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='progid:DXImageTransform.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='progid:DXImageTransform.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='progid:DXImageTransform.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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum