xsl-list
[Top] [All Lists]

Re: Concat question from a non-developer

2005-07-07 02:56:52
Hi,

Tempore 11:40:20, die 07/07/2005 AD, hinc in xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com scripsit Nicola Harlow <Nicola(_dot_)Harlow(_at_)pm-group(_dot_)com>:

                        [xsl:value-of
select="concat('document.all.',@name,'.style.display','=','block')"/]

Theoretically you could use a syntax like this:
<xsl:value-of select="concat('document.all.',@name,'.style.display','=',&quot;'block'&quot;)"/>

But don't do that: the concat function is to be used sparingly. An easier way would be:
<xsl:text>document.all.</xsl:text>
<xsl:value-of select="@name"/>
<xsl:text>.style.display='block'</xsl:text>


But I suggest you try the compact method: attribute value templates:

<span onClick="document(_dot_)all(_dot_){(_at_)name}(_dot_)style(_dot_)display = 
'block'"
onClickOut="document(_dot_)all(_dot_){(_at_)name}(_dot_)style(_dot_)display = 
'block'"
style="text-decoration:underline; color:green"/>

btw, don't use document.all - use DOM functions like document.getElementById()



regards,
--
Joris Gillis (http://users.telenet.be/root-jg/me.html)
Spread the wiki (http://www.wikipedia.org)

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>