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

How do we call Javascript function in XSL file on Netscape (Ver 6.2) b

  • To: xml-dev@l...
  • Subject: How do we call Javascript function in XSL file on Netscape (Ver 6.2) browser?
  • From: "Deshpande, Gururaj" <gururaj.deshpande@f...>
  • Date: Wed, 10 Apr 2002 11:11:22 -0400
  • Return-receipt-to: "Deshpande, Gururaj" <gururaj.deshpande@f...>

call javascript function in xsl
To, all XML Gurus
My question is about Netscape 6.2, XSL, XML and Javascript. I am doing
client side transformation. No server support at all. When I call javascript
function within XSL file, Netscape does not run / understand the javascript.
Same works on IE without problems. 
I am copying my XSL file below. 
Does anybody has a solution? Thanks 
Gururaj

xsl file 
<?xml version='1.0' encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/">
   <html>
      <head>
         <title></title>
      </head>
	<link rel="stylesheet" type="text/css"
href="../html/SparesCat.CSS"></link>
	<SCRIPT language="JavaScript"><![CDATA[
			function test(avalue) {
				alert(avalue);
			}
      ]]></SCRIPT>
      <body>
		<table>
		<tr>
		    <td>Equipment No..</td>
		    <td>Description.</td>
		    <td>Manufacture No..</td>
		    <td>Contract No.</td>
		</tr>
		<xsl:apply-templates select="plant/dept/eqpt"/> 
		</table
            	
      </body>
   </html>
</xsl:template>
<xsl:template match="plant/dept/eqpt">
	<xsl:for-each select=".">
	<tr valign="middle" class="TableGrey">
	<td><a href="javascript:test('{prodxml}')"><xsl:value-of
select="equipmentno"/></a></td>
    	<td><xsl:value-of select="description"/></td>
    	<td><xsl:value-of select="manufactureno"/></td>
    	<td><xsl:value-of select="contractno"/></td>
	</tr>
	</xsl:for-each>
</xsl:template>
</xsl:stylesheet>



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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.