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

Re: embedding xsl within javascript

Subject: Re: embedding xsl within javascript
From: Phil Endecott <spam_from_xslt_list@xxxxxxxxxxxx>
Date: Thu, 29 Jul 2004 15:30:49 +0100
phil endecott
within my xsl I have the following basic rollover functionality

----
<a href="about.asp?page=1"
onmouseover="MM_swapImage('a1','','/images/about/about1_on.gif',1)"
onmouseout="MM_swapImgRestore()"><img src="/images/about/about1.gif"
border="0" name="a1"/></a>
----

I want to add a parameter to the image path, which is straightforward if its
just around the <img> tag:

----
<xsl:attribute name="src"><xsl:value-of
select="$ImgDir"/>about/about1_on.gif</xsl:attribute></img>
----

Or you could use the even simpler form using {}:


<img src="{$ImgDir}about/about1_on.png" alt="..."/>

but what within javascript statements? like in the mouseover state above?
how do I add the $ImgDir into the image path?

Just the same:


<a href="about.asp?page=1"
   onmouseover="MM_swapImage('a1','','{$ImgDir}about/about1_on.gif',1)"
   onmouseout="MM_swapImgRestore()">
  <img src="{$ImgDir}about/about1.gif"
       style="border:0" id="a1"/>
</a>


--Phil.


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.