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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ismailc
    New Member
    • Sep 2006
    • 200

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

    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

    [code=html]
    <div id="hoverText2 " class="main" style="padding: 5px; position: absolute; display: none; width: 200px; cursor : default;"></div>

    <script type="text/javascript">
    var hoverText2 = document.getEle mentById('hover Text2');
    function showHover2(txt, e){
    if(document.all ){
    xpos = event.clientX + document.body.s crollLeft;
    ypos = event.clientY + document.body.s crollTop;
    }
    else{
    xpos = e.pageX;
    ypos = e.pageY;
    }

    hoverText2.inne rHTML = txt;
    hoverText2.styl e.left = "-50px";
    hoverText2.styl e.top = ypos + 4 + 'px';
    hoverText2.styl e.display = "block";
    hoverText2.styl e.cursor = "default";

    }
    function hideHover2(){
    hoverText2.inne rHTML = "";
    hoverText2.styl e.display = "none";
    }
    </script>

    <xsl:element name="asp:image ">
    <xsl:attribut e name='id'>ttip_ <xsl:value-of select='$nextNo de/@name' /></xsl:attribute>
    <xsl:attribut e name='runat'>se rver</xsl:attribute>
    <xsl:attribut e name='imageurl' >images/help.jpg</xsl:attribute>
    <xsl:attribut e name='style'>cursor:default</xsl:attribute>
    <xsl:attribut e name='onmousemo ve'>ttip_<xsl:value-of select='$nextNo de/@name' />.style.curso r = 'default'; showHover2('<xs l:value-of select="$nextNo de/Tooltip" />', event)</xsl:attribute>
    <xsl:attribut e name='onmouseou t'>hideHover2() </xsl:attribute>
    <xsl:attribut e name='class'>ma in</xsl:attribute>
    </xsl:element>
    [/code]
    Please Any Ideas!

    Regards
    Last edited by gits; Jan 26 '08, 04:15 PM. Reason: fix code tags
  • ismailc
    New Member
    • Sep 2006
    • 200

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

    Thank You

    Comment

    • gits
      Recognized Expert Moderator Expert
      • May 2007
      • 5388

      #3
      hi,

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

      kind regards

      Comment

      Working...