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

Re: javascript

Subject: Re: javascript
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Wed, 13 Mar 2002 15:12:24 +0000
javascript functions.js
Hi Stevenson,

> In xsl, how can I insert a JavaScript? I have tried:
>
> <Script language="JavaScript" src="functions.js"></script>
>
> But it didn't work. Can someone help?

I've found that Internet Explorer doesn't like script elements that
don't have any content (perhaps because with the XML output method
they don't have a close tag). You can get around the problem by
inserting a comment within the script element:

  <script type="text/javascript" src="functions.js">
    <!-- comment inserted for Internet Explorer -->
  </script>

You can generate this script element from XSLT with:

  <script type="text/javascript" src="functions.js">
    <xsl:comment> comment inserted for Internet Explorer </xsl:comment>
  </script>

Cheers,

Jeni

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


 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.