Subject: Re: [xsl] Re: XSL - Javascript problem From: Oleg Tkachenko <olegt@xxxxxxxxxxxxx> Date: Thu, 25 Oct 2001 12:12:27 +0200 |
Hi Oleg & xsl-List members, Thanx for your swift reply! Below you will find my stylesheets, these are shortened versions but with the functionality that I need. Normally the onLoadBody() must be executed but Netscape 6.1 gives the "Error: onLoadBody() is not defined" in the Javascript Console.
greetz, Annelies Vercruysse
XSL:----------------------------------------------------------------
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html> <head> <title>Test page with javascript code</title>
<script type="text/javascript"> function onloadBody() { alert('When you see this, javascript works!'); } </script>
</head>
<body onload="onloadBody();"> <table border="1"> <tr> <th>Title</th> <th>Artist</th> </tr> <xsl:for-each select="CATALOG/CD"> <tr> <td><xsl:value-of select="TITLE" /></td> <td><xsl:value-of select="ARTIST" /></td> </tr> </xsl:for-each> </table> </body>
</html>
</xsl:template> </xsl:stylesheet> -------------------------------------------------------------------- XML:----------------------------------------------------------------
<?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="test.xsl"?> <CATALOG> <CD> <TITLE>Hide your heart</TITLE> <ARTIST>Bonnie Tyler</ARTIST> </CD> <CD> <TITLE>Greatest Hits</TITLE> <ARTIST>Dolly Parton</ARTIST> </CD> <CD> <TITLE>Still got the blues</TITLE> <ARTIST>Gary Moore</ARTIST> </CD> </CATALOG>
-- Oleg Tkachenko Multiconn International, Israel
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re: XSL - Javascript problem, Annelies Vercruysse | Thread | [xsl] Building attributes using ano, Manos Batsis |
RE: [xsl] How to read the encoding , Michael Kay | Date | RE: [xsl] using xsl to check for du, Michael Kay |
Month |