cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From George Pieri <>
Subject RE: XML/XSLT to html including JavaScript question
Date Fri, 26 Jul 2002 13:11:32 GMT

Is your javascript function being called at all ?
If you hardcode a simple javascript helloworld function
with an alert('Hello') in it within the same xsl file will
you see the popup ?

I have gotten this to work using external files below is
a sample of my xls which will call a javascript function on
events for a table cell....

   <script language="javascript" src="resources/wcomView.js"></script>
             <xsl:attribute name="onmouseover"><xsl:value-of
             <xsl:attribute name="onmouseout"><xsl:value-of
             <xsl:attribute name="onclick"><xsl:value-of

Good luck :>

-----Original Message-----
From: Jeanine Meyer []
Sent: Thursday, July 25, 2002 3:06 PM
Subject: XML/XSLT to html including JavaScript question

(Forgive any redundancy with previous messages.)
I'm having problems with what I think is a simple task: recreating the
standard image swap in on mouse over.
I have other examples of xml citing xsl working using IE6 and also NS6.2.
However, in this example, the javascript function doesn't seem to be called.
Also, when I use saxon, a file is produced that works in NS6.2 but not
in IE6.
Here is the xml file:
<?xml version="1.0" ?>
<?xml-stylesheet href="mouseover2.xsl" type="text/xsl"?>

<?xml version="1.0" ?>
<xsl:transform xmlns:xsl=""
<xsl:output method="html" />
<xsl:template match="/pictures">
<title> Rollover test </title>
<script language="JavaScript" type="text/javascript" src="movein.js">
<xsl:element name="a">
  <xsl:attribute name="href"></xsl:attribute>
  <xsl:attribute name="onMouseOver">movein('<xsl:value-of
  <xsl:attribute name="onMouseOut">movein('<xsl:value-of
  <xsl:attribute name="onClick">return false;</xsl:attribute>
  <xsl:element name="img">
    <xsl:attribute name="src"><xsl:value-of
    <xsl:attribute name="id">picture1</xsl:attribute>
*************the result of using saxon
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

      <title> Rollover test </title><script language="JavaScript"
type="text/javascript" src="movein.js"></script></head>
   <body><a href="" onMouseOver="movein('Darcy3.jpg');"
onMouseOut="movein('Liz-book.jpg');" onClick="return false;"><img
src="Liz-book.jpg" id="picture1"></a></body>
function movein(image)

I get the same results when I put in the function movein.js directly in
the mouseover.xsl (that is, when the resulting html doesn't use an external
javascript, but a local one).

Jeanine Meyer

Please check that your question  has not already been answered in the
FAQ before posting.     <>

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

Please check that your question  has not already been answered in the
FAQ before posting.     <>

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

View raw message