|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: JavaScript In Cocoon
Paul Johnson wrote:
>
> Ok,
>
Also, do this to make it type out your java script.
>
> <SCRIPT>
> <![CDATA[
> function winFunction(desc)
> {
> w =window.open("blank.htm","winName","width=300,height=300");
> w.document.write("<HTML><HEAD><TITLE>Program Description</TITLE>");
> w.document.write("</HEAD>");
> w.document.write("<BODY><DIV>Hello, world!<DIV></BODY></HTML>");
> w.document.write(desc);
> w.document.write("Hello, world");
> w.document.write("</DIV></BODY></HTML>");
> }
> ]]>
> </SCRIPT>
And you could pass the result of an xsl operation to a javascript
variable for writing in your new window:
<script language="JavaScript">
<![CDATA[title = ']]><xsl:value-of
select="path/to/your/value"/><![CDATA[']]>
<xsl:comment>
<![CDATA[
function winFunction(desc)
{
w =window.open("blank.htm","winName","width=300,height=300");
w.document.write("<HTML><HEAD><TITLE>");
w.document.write(title);
w.document.write("</TITLE></HEAD>");
w.document.write("<BODY><DIV>Hello,
world!<DIV></BODY></HTML>");
w.document.write(desc);
w.document.write("Hello, world");
w.document.write("</DIV></BODY></HTML>");
}
]]>
</xsl:comment>
</script>
Paul Johnson wrote:
>
> Ok,
>
Also, do this to make it type out your java script.
>
> <SCRIPT>
> <![CDATA[
> function winFunction(desc)
> {
> w =window.open("blank.htm","winName","width=300,height=300");
> w.document.write("<HTML><HEAD><TITLE>Program Description</TITLE>");
> w.document.write("</HEAD>");
> w.document.write("<BODY><DIV>Hello, world!<DIV></BODY></HTML>");
> w.document.write(desc);
> w.document.write("Hello, world");
> w.document.write("</DIV></BODY></HTML>");
> }
> ]]>
> </SCRIPT>
--
Stephen Yearl, Project Archivist
stephen_yearl@xxxxxxx
*************************
Connecticut Historical Society
1 Elizabeth Street
Hartford, CT, 06105
*************************
http://www.chs.org
*************************
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








