By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,435 Members | 2,939 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,435 IT Pros & Developers. It's quick & easy.

Onmouseover,call function but as cursor moves - cursor changes whole time!

100+
P: 200
Hi, I need help please!

Onmouseover it calls a function, but onmouseover the image it changes the cursor from default ot busy the whole time.

I want it to stay to default.
I have set it o default in the div, function & onmouseover but it stil does that

Expand|Select|Wrap|Line Numbers
  1.    <div id="hoverText2" class="main" style="padding: 5px; position: absolute; display: none; width: 200px; cursor : default;"></div>
  2.  
  3.           <script type="text/javascript">
  4.             var hoverText2 = document.getElementById('hoverText2');
  5.             function showHover2(txt, e){
  6.             if(document.all){
  7.             xpos = event.clientX + document.body.scrollLeft;
  8.             ypos = event.clientY + document.body.scrollTop;
  9.             }
  10.             else{
  11.             xpos = e.pageX;
  12.             ypos = e.pageY;
  13.             }
  14.  
  15.             hoverText2.innerHTML = txt;
  16.             hoverText2.style.left = "-50px";
  17.             hoverText2.style.top = ypos + 4 + 'px';
  18.             hoverText2.style.display = "block";
  19.             hoverText2.style.cursor = "default";
  20.  
  21.             }
  22.             function hideHover2(){
  23.             hoverText2.innerHTML = "";
  24.             hoverText2.style.display = "none";
  25.             }
  26.           </script>
  27.  
  28.           <xsl:element name="asp:image">
  29.             <xsl:attribute name='id'>ttip_<xsl:value-of select='$nextNode/@name' /></xsl:attribute>
  30.             <xsl:attribute name='runat'>server</xsl:attribute>
  31.             <xsl:attribute name='imageurl'>images/help.jpg</xsl:attribute>
  32.             <xsl:attribute name='style'>cursor:default</xsl:attribute>
  33.             <xsl:attribute name='onmousemove'>ttip_<xsl:value-of select='$nextNode/@name' />.style.cursor = 'default'; showHover2('<xsl:value-of select="$nextNode/Tooltip" />', event)</xsl:attribute>
  34.             <xsl:attribute name='onmouseout'>hideHover2()</xsl:attribute>
  35.             <xsl:attribute name='class'>main</xsl:attribute>
  36.           </xsl:element>  
  37.  
Please Any Ideas!

Regards
Jan 25 '08 #1
Share this Question
Share on Google+
2 Replies


100+
P: 200
Hi, Thanks for the assist got it sorted out!
I had to remove : style="background: url(../../images/template/glass/c.png);
it was trying to load the image the whole time!

Thank You
Jan 28 '08 #2

gits
Expert Mod 5K+
P: 5,333
hi,

glad to hear you got it working and for sharing the solution ...

kind regards
Jan 28 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.