[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: : Problems with Javascript block / Netscape

Subject: RE: : Problems with Javascript block / Netscape
From: "Uronis, Jeremy" <Jeremy.Uronis@xxxxxxxxxxxxx>
Date: Fri, 17 Aug 2001 09:45:33 -0400
javascrip length
>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 &lt; 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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.