Re: [xsl] javascript problem

Subject: Re: [xsl] javascript problem
From: Paul Kelly <pjkelly5@xxxxxxxxxx>
Date: Thu, 18 Jul 2002 15:19:59 -0400
Thanks to everyone for the responses. It appears the answer would be server-side (I use cocoon) or perhaps extensions (?).

This is not an xslt issue, it is a web page design issue.  You should make
sure that you get your HTML working right first, ***before*** trying to
create it with a stylesheet.

OK, apologies if this was not an xslt issue. I thought the problem had to do with output encoding or something. But you and others say it won't execute simply because the written-out tag is in the document header. And then only because it is output from a preceding xslt transformation since placing the script in the head of a straight html doc works just fine.



> But this one will (it's further down inside the body of the html output):

<script language="JavaScript"> { document.write("&lt;hr width='10' /&gt;"); } </script>


This executes when the page builder works its way down to this part of the page. But why not just put in the html directly at this point? You are only putting in a simple html element.

I only have it here to illustrate that the same type of script works in a different part of the document. Of course, if I wanted an <hr> I'd simply insert it.


BTW: wrapping it as CDATA simply prints the link tag to the final display.

--paul

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


Current Thread