This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: : Problems with Javascript block / Netscape


Hi Jeremy,

> I have some JavaScript in my XSL. (example below) This works fine
> with IE, but not with Netscape. The problem is that for instance
> this line here
>
>   for(i = 0; i < numAvail; i++){
>
> gets converted into this
>
>   for(i = 0; i &lt; numAvail; i++){
>
> IE can handle the change from "<" to "&lt;", but NS can't. Is there
> anyway to output these symbols in regular form?

It sounds as though you're outputting HTML, but not using the HTML
output method. The HTML output method should not escape less-than
signs in script elements. To use the HTML output method, do:

<xsl:output method="html" />

Chuck Evans' suggestion of putting the script in an external file and
referencing it is an even better solution if you're not generating
parts of the JavaScript on the fly.

I hope that helps,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]