cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Schultz, Gary - COMM" <>
Subject RE: Problem with JavaScript in Cocoon
Date Wed, 23 Feb 2005 14:57:00 GMT
I have tried the suggestion given to me in this reply and another reply to
my message. These fix the && problem, but now brings up another potential
problem. It seems that when I serve web pages through Cocoon and include the
javascript using <script type="text/javascript" src="resources/my.js"/>
javascript functions using the window object fail. The javascript error I
receive is "setting a property that only has a getter." Has anyone else
experienced this problem?

I know the scripts I'm using work. I have created static web pages served
from Apache and include the javascript using <script type="text/javascript"
src="resources/my.js"/>. All javascript functions works fine in those web

I use default serialization of web pages. Does that affect the output DOM
which in turn affects the javascript function ability to work with the
window object? This is troubling, because I may be forced to bypass Cocoon
for web pages that use javascript functions working on the window object. 

-----Original Message-----
From: Antonio Gallardo []
Sent: Tuesday, February 22, 2005 11:11 PM
Subject: Re: Problem with JavaScript in Cocoon

On Mar, 22 de Febrero de 2005, 16:00, Schultz, Gary - COMM dijo:
> I need to use JavaScript in a web page. I having trouble with using && in
> an
> if {...}. I get the error "The entity name must immediately follow the '&'
> in the entity reference."
> I'm not sure where to set the name for the entity reference. I have tried
> <xsl:text disable-output-escaping="yes"> and still get the error. I've
> read
> stuff from Michael Kay and Jeni Tennison, et al, and still can't get it to
> work.
> What do I need to do in Cocoon to get && to come out as && in the
> resulting
> html. I get the error whether I serialize as html or xml, makes no
> difference.

Try to put it in a separated file and include the file in your out page
inside the <head> using:

<script type="text/javascript" src="resources/my.js"/>

Best Regards,

Antonio Gallardo

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

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

View raw message