469,922 Members | 2,148 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,922 developers. It's quick & easy.

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

200 100+
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
2 2325
ismailc
200 100+
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
5,390 Expert Mod 4TB
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.

Similar topics

12 posts views Thread by Epetruk | last post: by
2 posts views Thread by news.west.cox.net | last post: by
1 post views Thread by Martin Chen | last post: by
5 posts views Thread by Martin Chen | last post: by
2 posts views Thread by Justin Rowe | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.