This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

XSL and Javascript to set new window parameters


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]