|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: : Problems with Javascript block / Netscape
>Michael wrote:
>And there are two further points in favour of this approach.
>1) Since an XML editor and and XSLT processor will let you accidentally
>damage the innards of a <script> element while editing the XSLT code,
>it's much better to keep the static parts out of harm's way in their own
>js libraries
>2) You can invoke such libraries from multiple html pages. That way,
>they can stay cached after the first invocation and don't get sent
>again, even if the main page is refreshed.
you have good points. ill move the code out when i get a chance.
i did work the problem out though. i was wrong in my initial post.
ns can handle code such as < in javascript.
when reading msdn it said to write your javascript block like so:
<SCRIPT LANGUAGE="javascript" DEFER="true">
<xsl:comment>
<![CDATA[
if(document.forms[0].lstSelectedCats &&
document.forms[0].lstSelectedCats.length==0){
document.forms[0].lstSelectedCats.length = 1;
<snip>
]]>
</xsl:comment>
</SCRIPT>
the closing xsl:comment is what was causing the problem with netscape. in
order for this code to
work in both ie and ns you need to close your xsl:comment with two forward
slashes first like so:
//</xsl:comment>
thanks -
jeremy
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








