This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: javascript
- From: Jeni Tennison <jeni at jenitennison dot com>
- To: "stevenson" <stevenson at epr dot footman-walker dot com>
- Cc: xsl-list at lists dot mulberrytech dot com
- Date: Wed, 13 Mar 2002 15:12:24 +0000
- Subject: Re: [xsl] javascript
- Organization: Jeni Tennison Consulting Ltd
- References: <OOEMLIMIIBLDEKIKOHJAKENFCDAA.stevenson@epr.footman-walker.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
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