XSL with tooltips

Discussion in 'Javascript' started by Ofay, Sep 28, 2004.

  1. Ofay

    Ofay Guest

    I am trying to do a mouseover with tooltips with an XSL stylesheet. I
    want to be able to pick data from the XML using the syntax
    <xsl:value-of select="CHALLENGE_REMARKS"/> How do I send the data
    from this element to the doToolTip function.

    Ex.
    <td> onmouseover="doTooltip(event,<xsl:value-of
    select="CHALLENGE_REMARKS"/>) </td>

    This does not work. I have tried putting the element in a var and
    this works except when there are multiple rows the mouseover tooltip
    only displays the data for the last row for all rows.

    Any thoughts?
     
    Ofay, Sep 28, 2004
    #1
    1. Advertising

  2. Maybe:

    <td><xsl:attribute name="onmouseover">JavaScript:doTooltip(event,<xsl:value-of select="CHALLENGE_REMARKS" />)</xsl:attribute></td> or something like that. You may need a seperate js file with the JavaScript code and import that near the top of your xsl:

    <xsl:template match="/">
    <HTML>
    <HEAD>
    <TITLE>Menu <xsl:value-of select="TOPICLIST/@TYPE" /></TITLE>
    <SCRIPT LANGUAGE="JavaScript" SRC="name.js"></SCRIPT>
    ....

    --
    George Hester
    __________________________________
    "Ofay" <> wrote in message news:...
    > I am trying to do a mouseover with tooltips with an XSL stylesheet. I
    > want to be able to pick data from the XML using the syntax
    > <xsl:value-of select="CHALLENGE_REMARKS"/> How do I send the data
    > from this element to the doToolTip function.
    >
    > Ex.
    > <td> onmouseover="doTooltip(event,<xsl:value-of
    > select="CHALLENGE_REMARKS"/>) </td>
    >
    > This does not work. I have tried putting the element in a var and
    > this works except when there are multiple rows the mouseover tooltip
    > only displays the data for the last row for all rows.
    >
    > Any thoughts?
     
    George Hester, Sep 30, 2004
    #2
    1. Advertising

  3. Ofay

    Ofay Guest

    Thanks George:

    I actually did some further research and found a solution which works:

    <td align="center" width="120">

    <a>
    <xsl:attribute name="style"><xsl:text>color:#000000;</xsl:text></xsl:attribute>
    <xsl:attribute name="href"><xsl:value-of
    select="substring(CHALLENGE_REMARKS,1,12)"/></xsl:attribute>
    <xsl:attribute
    name="onMouseOver">doTooltip(event,'<xsl:value-of
    select="CHALLENGE_REMARKS"/>')
    <xsl:text> </xsl:text>return true<xsl:text>
    </xsl:text></xsl:attribute>
    <xsl:attribute name="onmouseout">hideTip()</xsl:attribute>
    <xsl:value-of select="substring(CHALLENGE_REMARKS,1,12)"/>

    </a>
    </td>

    Again Thanks.

    "George Hester" <> wrote in message news:<07L6d.250846$>...
    > Maybe:
    >
    > <td><xsl:attribute
    > name="onmouseover">JavaScript:doTooltip(event,<xsl:value-of
    > select="CHALLENGE REMARKS" />)</xsl:attribute></td> or something like
    > that. You may need a seperate js file with the JavaScript code and
    > import that near the top of your xsl:
    >
    > <xsl:template match="/">
    > <HTML>
    > <HEAD>
    > <TITLE>Menu <xsl:value-of select="TOPICLIST/@TYPE" /></TITLE>
    > <SCRIPT LANGUAGE="JavaScript" SRC="name.js"></SCRIPT>
    > ...
    >
    > --
    > George Hester
    >
    > "Ofay" <> wrote in message
    > news:...
    > > I am trying to do a mouseover with tooltips with an XSL stylesheet. I
    > > want to be able to pick data from the XML using the syntax
    > > <xsl:value-of select="CHALLENGE REMARKS"/> How do I send the data
    > > from this element to the doToolTip function.
    > >
    > > Ex.
    > > <td> onmouseover="doTooltip(event,<xsl:value-of
    > > select="CHALLENGE REMARKS"/>) </td>
    > >
    > > This does not work. I have tried putting the element in a var and
    > > this works except when there are multiple rows the mouseover tooltip
    > > only displays the data for the last row for all rows.
    > >
    > > Any thoughts?
     
    Ofay, Sep 30, 2004
    #3
  4. Cool thanks. I'll be checking that out.

    --
    George Hester
    __________________________________
    "Ofay" <> wrote in message news:...
    > Thanks George:
    >
    > I actually did some further research and found a solution which works:
    >
    > <td align="center" width="120">
    >
    > <a>
    > <xsl:attribute name="style"><xsl:text>color:#000000;</xsl:text></xsl:attribute>
    > <xsl:attribute name="href"><xsl:value-of
    > select="substring(CHALLENGE_REMARKS,1,12)"/></xsl:attribute>
    > <xsl:attribute
    > name="onMouseOver">doTooltip(event,'<xsl:value-of
    > select="CHALLENGE_REMARKS"/>')
    > <xsl:text> </xsl:text>return true<xsl:text>
    > </xsl:text></xsl:attribute>
    > <xsl:attribute name="onmouseout">hideTip()</xsl:attribute>
    > <xsl:value-of select="substring(CHALLENGE_REMARKS,1,12)"/>
    >
    > </a>
    > </td>
    >
    > Again Thanks.
    >
    > "George Hester" <> wrote in message news:<07L6d.250846$>...
    > > Maybe:
    > >
    > > <td><xsl:attribute
    > > name="onmouseover">JavaScript:doTooltip(event,<xsl:value-of
    > > select="CHALLENGE REMARKS" />)</xsl:attribute></td> or something like
    > > that. You may need a seperate js file with the JavaScript code and
    > > import that near the top of your xsl:
    > >
    > > <xsl:template match="/">
    > > <HTML>
    > > <HEAD>
    > > <TITLE>Menu <xsl:value-of select="TOPICLIST/@TYPE" /></TITLE>
    > > <SCRIPT LANGUAGE="JavaScript" SRC="name.js"></SCRIPT>
    > > ...
    > >
    > > --
    > > George Hester
    > >
    > > "Ofay" <> wrote in message
    > > news:...
    > > > I am trying to do a mouseover with tooltips with an XSL stylesheet. I
    > > > want to be able to pick data from the XML using the syntax
    > > > <xsl:value-of select="CHALLENGE REMARKS"/> How do I send the data
    > > > from this element to the doToolTip function.
    > > >
    > > > Ex.
    > > > <td> onmouseover="doTooltip(event,<xsl:value-of
    > > > select="CHALLENGE REMARKS"/>) </td>
    > > >
    > > > This does not work. I have tried putting the element in a var and
    > > > this works except when there are multiple rows the mouseover tooltip
    > > > only displays the data for the last row for all rows.
    > > >
    > > > Any thoughts?
     
    George Hester, Sep 30, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stevie_mac

    Tooltips on datagrid titles

    Stevie_mac, Jul 25, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    452
    Stevie_mac
    Jul 25, 2003
  2. Roberto López

    ToolTips delay and display times??

    Roberto López, Aug 22, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    4,401
    Roberto López
    Aug 23, 2003
  3. Steve Chatham

    tooltips in datagrid?

    Steve Chatham, Feb 18, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    382
    =?Utf-8?B?QmFycnkgRm9ycmVzdA==?=
    Feb 18, 2004
  4. Replies:
    1
    Views:
    3,613
    A. Bolmarcich
    May 27, 2005
  5. Frank
    Replies:
    2
    Views:
    511
    BootNic
    Dec 7, 2006
Loading...

Share This Page