[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Template Rule for JavaScript Rollovers

Subject: Re: Template Rule for JavaScript Rollovers
From: "Blond JB" <pblond@xxxxxxxxxxxxxxxx>
Date: Fri, 16 Jun 2000 11:16:51 -0700
javascript rollover message
Hello!

It's my first word here on this list!
I'am a web developper and am working hard on XSL. So let me give you my
point of view on Daniel's template : Fine! But <img></img> is NOT HTML 4.0
compliant! Instead use the <xsl:element name="img"></xsl:element>, and put a
<xsl:output method="html" /> at the beginning of the stylesheet. This way
you'll get a <img ... > tag in the output!

See ya!
JB
----- Original Message -----
From: Daniel Hinz <daniel.hinz@xxxxxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxx>
Sent: Friday, June 16, 2000 9:59 AM
Subject: Template Rule for JavaScript Rollovers


> Just a Template that generates Crossbrowser JavaScript Rollover Buttons:
>
> <xsl:template match="button">
> <a>
>  <xsl:attribute name="href">
>   <xsl:value-of select="@url"/>
>  </xsl:attribute>
>  <xsl:attribute name="onMouseOver">
>   document.images['cm<xsl:value-of select="@id"/>'].src='<xsl:value-of
> select="@rollover"/>';
>  </xsl:attribute>
>  <xsl:attribute name="onMouseOut">
>         document.images['cm<xsl:value-of
> select="@id"/>'].src='<xsl:value-of select="@active"/>';
>  </xsl:attribute>
>  <img>
>   <xsl:attribute name="name">cm<xsl:value-of
> select="@id"/></xsl:attribute>
>         <xsl:attribute name="src"><xsl:value-of
> select="@active"/></xsl:attribute>
>         <xsl:attribute name="alt"></xsl:attribute>
>         <xsl:attribute name="border">0</xsl:attribute>
>  </img>
> </a>
> </xsl:template>
>
>
> use it with
>
> <button id="1" active="some.gif" rollover="another.gif"
> inactive="sleepy.gif"/>
>
>
> You can build menus with a single highlighted Button easily by extending
> the template rule above with an xsl:choose Element.
>
> Regards,
>
> Daniel Hinz
>
>
> --
> Daniel Hinz - XML Evangelist and Software Developer
> Higher-Order AG
> Burchardstrasse 19, D-20095 Hamburg, Germany
> fon: 040 / 325587 - 0  fax: 040 / 325587 - 99
> mailto:daniel.hinz@xxxxxxxxxxxxxxx http://www.higher-order.de
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.