IE5 B2 and JavaScript

Subject: IE5 B2 and JavaScript
From: "Wendu Cameron" <wcam001@xxxxxxxxxx>
Date: Sat, 20 Feb 1999 11:49:57 +1100
Im new to XML and XSL and also heavy srcipting in HTML etc.  I am using
IE5B2 for display

My Questions are
1)Is the DOM not available to the script unless your inside a template. Ie i
cant use document.all(targetID) or = ""
Ive had errors like document is not an object
style is not an object etc.
2)What script languages are supported in IE5B2 to what extent.  What are the
limitations on the ways you can access them.
3)Is it the case that IE5 always uses JScript whenever interpreting

Help lost in JScript Errors! in XSL
Any enlightement you can pass on would be appreciated!!

Background Information

I realise JScript is Microsofts Implementation of JavaScript.  Im also aware
of ECMA Script and the DOM.  Which I think the latest draft is being
supported in IE5.  No indepth knowledge as yet. Im looking at them.

Yes ive seen examples of scripts which work inside the stylesheet
declaration these scripts dont use references to elements (nodes) within the
XSL Stylesheet.


<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="";>
	<xsl:template language="JavaScript" match="/">
This is my Java Script. Which is called from any HTML tag
using onclick="ClickHandler(this);" and the child element with name
Out1details is hidden.
Yes im only developing for one browser IE5 no backwards compatibility or
cross browser compatibility.

function clickHandler(ElementType, srcElement) {
  var targetId, targetElement;
  srcElement = window.event.srcElement;
  targetId = + "details";
  targetElement = document.all(targetId);
  if ( == "none") { = "";
  } else { = "none";

If I place this script inside HTML SCRIPT Tags within the Template tags it
works fine.  However if I move the script out a level to the stylesheet and
use xsl:script I get a JScript Syntax error. Despite specifying JavaScript.

I copied the following example from Microsofts site
<xsl:stylesheet language="VBScript">
  <xsl:template match="*">
    <xsl:eval>Call Celsius(32)</xsl:eval>
<xsl:script language="VBScript">
  Function Celsius(fDegrees)
    Celsius = (fDegrees - 32) * 5 / 9
  End Function

Which no matter what I do I cant make it work.
First error is There is more than one element in stylesheet
After changing that All. I get is VBScript errors.

Regards Wendy

 XSL-List info and archive:

Current Thread