This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
XSL and Javascript to set new window parameters
- To: <xsl-list at mulberrytech dot com>
- Subject: XSL and Javascript to set new window parameters
- From: "Phil Davies" <phildavies at futuresource dot co dot uk>
- Date: Wed, 8 Nov 2000 18:07:37 -0000
- Reply-To: xsl-list at mulberrytech dot com
I have an XSL sheet that constructs a simple table with links created from a
set of ID's taken from the XML.
Creating the link is straighforward but I want to ensure that the link is
opened in a new window with specific parameters. I know how to do this in
Javascript using the code
onClick="window.open('default.html','new','toolbars=no,scrollbars=no')
but do not know how to integrate this into XSL, particularly as I am using a
referenced XML value and CDATA in the HREF link.
<xsl:element name="a">
<xsl:attribute name = "href">document.asp?id=<xsl:value-of
select="@id"/><![CDATA[&level=1&prodId=news]]>
</xsl:attribute>
<xsl:attribute name = "target">target="_blank"
</xsl:attribute>
<xsl:attribute name = "title">title="Title"
</xsl:attribute>
<xsl:value-of/>
</xsl:element>
I tried to use the following code but had no result, it was ignored.
<xsl:attribute name =
"onClick">onClick="window.open('document.asp?id=<xsl:value-of
select="@id"/><![CDATA[&level=1&prodId=news]]>','_blank','toolbars=no,scroll
bars=no')"
</xsl:attribute>
Any help appreciated
Phil Davies
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list