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

Re: JavaScript In Cocoon

Subject: Re: JavaScript In Cocoon
From: Stephen Yearl <stephen_yearl@xxxxxxx>
Date: Wed, 10 Nov 1999 10:33:10 -0800
document.write body
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


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.