My code is done in JavaScript. I've tried replacing xmldoc = new ActiveXObject("MSXML.DOMDocument"

; to either of your definitions and I get the exact same results as before; the script works locally but not on the server. I'll included my source files below. My xml files look like:
<?xml version = "1.0"?>
<contacts>
<contact>
<FirstName>Robert</FirstName>
<LastName>Facca</LastName>
<JobTitle>IT Director</JobTitle>
<Phone>982-5298</Phone>
<Pager>416-753-1418</Pager>
<Email>Robert.Facca@TD.com</Email>
</contact>
</contacts>
My html file is as follows:
<!DOCTYPE HTML PUBLIC "_//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD><TITLE>NWS Address Book</TITLE>
<link rel="stylesheet" type="text/css" href="TD.css">
<STYLE>
.head2 {font: bold; cursor: hand}
</STYLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
function checkIt(e)
{
var charCode
//saves the charCode to the key pressed
if (navigator.appName.indexOf("Microsoft Internet Explorer"

>= 0)
{ charCode = e.keyCode
}
else
{
charCode = e.which
}
if (charCode == 13)
{ filter();
}
return true
}
// resets the address book to its original form
function revert()
{
xmldoc = new ActiveXObject("microsoft.xmldom"

;
xmldoc.load("addressBook.xml"

;
xmldoc.documentElement.transformNodeToObject(xmldoc.documentElement,
xmlData.XMLDocument);
}
// filters the addres book according to the search criteria
function filter()
{
var subTree;
var parentTree;
var newTree;
var filterPath;
var searchString;
var field;
// xmldoc = new ActiveXObjec("MSXML.DOMDocument"

;
// xmldoc = new ActiveXObject("microsoft.xmldom"

;
xmldoc = new ActiveXObject("microsoft.XMLDOM"

;
xmldoc.load("addressBook.xml"

;
// gets the field that we wanted to search
field = document.frmAddress.lstFilter.options[document.frmAddress.lstFilter.selectedIndex].value
// gets the value we want to match to
searchString = frmAddress.txtFilter.value;
// filters all contact nodes
filterPath = "/contacts/contact";
// applies the filter
subTree = xmldoc.selectNodes(filterPath);
// filter it further by the search criteria
newTree = filterNodes(subTree, field, searchString);
// checks that the filter has a result
if (newTree == null)
{ alert("That value does not exist. Please try another value."

;
frmAddress.txtFilter.focus();
return;
}
newTree.documentElement.transformNodeToObject(newTree.documentElement,
xmlData.XMLDocument);
}
// takes the subtree and returns portions where field = searchString (ie LastName = Cheung)
// partial matches are permitted
function filterNodes(subTree, field, searchString)
{
var objDOM;
var match;
match = false;
objDOM = new ActiveXObject("microsoft.xmldom"

;
// creates the root element
var objNode;
objNode = objDOM.createElement("contacts"

;
objDOM.appendChild(objNode);
// loop for all nodes in the nodeList
for (var i=0; i<subTree.length; i++)
{
// adds the node to the new tree if field = searchString (LastName = Cheung)
if (matchString(subTree.item(i), field, searchString))
{ match = true;
objDOM.documentElement.appendChild(subTree.item(i));
}
}
// returns result tree, or null if tree is empty
if (match)
{ return objDOM; }
else
{ return null; }
}
// returns true if field matches searchString, partial matches are permitted
function matchString(contactTree, field, searchString)
{
var fieldNode;
var objNode;
// gets the first contact node
objNode = contactTree.firstChild;
// loop for all fields in the node
while (objNode.nextSibling != null)
{
// first matches the field in question
if (objNode.nodeName == field)
{
// then matches the searchString
// value starts with searchString is sufficient for a match
// if (objNode.firstChild.nodeValue.toLowerCase() == searchString.toLowerCase())
if (objNode.firstChild.nodeValue.toLowerCase().indexOf(searchString.toLowerCase()) == 0)
{ return true;
}
}
objNode = objNode.nextSibling;
}
return false;
}
-->
</SCRIPT>
</HEAD>
<BODY>
<TABLE BORDER='0' WIDTH='100%'>
<TR>
<TD><A HREF='Nws_main.htm' TARGET='_top'><img src='home.gif' width='57' height='52' ALT='Home' BORDER='0'/></A></TD>
<TD><h1>Network Services Address Book</h1></TD>
<TD WIDTH="57"></TD>
</TR>
</TABLE>
<XML ID = "xmlData" src = "addressBook.xml"></XML>
<XML ID = "xmlSortLastName">
<contacts>
<xsl:for-each order-by = "+LastName;+FirstName"
select = "contact"
xmlns:xsl = "
<contact>
<FirstName><xsl:value-of select = "FirstName" />
</FirstName>
<LastName><xsl:value-of select = "LastName" />
</LastName>
<JobTitle><xsl:value-of select = "JobTitle" />
</JobTitle>
<Phone><xsl:choose><xsl:when test = "Phone[.!='']"><xsl:value-of select = "Phone"/></xsl:when><xsl

therwise>n/a</xsl

therwise></xsl:choose>
</Phone>
<Pager><xsl:choose><xsl:when test = "Pager[.!='']"><xsl:value-of select = "Pager"/></xsl:when><xsl

therwise>n/a</xsl

therwise></xsl:choose>
</Pager>
<Email><xsl:value-of select = "Email" />
</Email>
</contact>
</xsl:for-each>
</contacts>
</XML>
<XML ID = "xmlSortFirstName">
<contacts>
<xsl:for-each order-by = "+FirstName;+LastName"
select = "contact"
xmlns:xsl = "
<contact>
<FirstName><xsl:value-of select = "FirstName" />
</FirstName>
<LastName><xsl:value-of select = "LastName" />
</LastName>
<JobTitle><xsl:value-of select = "JobTitle" />
</JobTitle>
<Phone><xsl:choose><xsl:when test = "Phone[.!='']"><xsl:value-of select = "Phone"/></xsl:when><xsl

therwise>n/a</xsl

therwise></xsl:choose>
</Phone>
<Pager><xsl:choose><xsl:when test = "Pager[.!='']"><xsl:value-of select = "Pager"/></xsl:when><xsl

therwise>n/a</xsl

therwise></xsl:choose>
</Pager>
<Email><xsl:value-of select = "Email" />
</Email>
</contact>
</xsl:for-each>
</contacts>
</XML>
<XML ID = "xmlSortJobTitle">
<contacts>
<xsl:for-each order-by = "+JobTitle"
select = "contact"
xmlns:xsl = "
<contact>
<FirstName><xsl:value-of select = "FirstName" />
</FirstName>
<LastName><xsl:value-of select = "LastName" />
</LastName>
<JobTitle><xsl:value-of select = "JobTitle" />
</JobTitle>
<Phone><xsl:choose><xsl:when test = "Phone[.!='']"><xsl:value-of select = "Phone"/></xsl:when><xsl

therwise>n/a</xsl

therwise></xsl:choose>
</Phone>
<Pager><xsl:choose><xsl:when test = "Pager[.!='']"><xsl:value-of select = "Pager"/></xsl:when><xsl

therwise>n/a</xsl

therwise></xsl:choose>
</Pager>
<Email><xsl:value-of select = "Email" />
</Email>
</contact>
</xsl:for-each>
</contacts>
</XML>
<XML ID = "xmlSortPhone">
<contacts>
<xsl:for-each order-by = "+Phone"
select = "contact"
xmlns:xsl = "
<contact>
<FirstName><xsl:value-of select = "FirstName" />
</FirstName>
<LastName><xsl:value-of select = "LastName" />
</LastName>
<JobTitle><xsl:value-of select = "JobTitle" />
</JobTitle>
<Phone><xsl:choose><xsl:when test = "Phone[.!='']"><xsl:value-of select = "Phone"/></xsl:when><xsl

therwise>n/a</xsl

therwise></xsl:choose>
</Phone>
<Pager><xsl:choose><xsl:when test = "Pager[.!='']"><xsl:value-of select = "Pager"/></xsl:when><xsl

therwise>n/a</xsl

therwise></xsl:choose>
</Pager>
<Email><xsl:value-of select = "Email" />
</Email>
</contact>
</xsl:for-each>
</contacts>
</XML>
<XML ID = "xmlSortPager">
<contacts>
<xsl:for-each order-by = "+Pager"
select = "contact"
xmlns:xsl = "
<contact>
<FirstName><xsl:value-of select = "FirstName" />
</FirstName>
<LastName><xsl:value-of select = "LastName" />
</LastName>
<JobTitle><xsl:value-of select = "JobTitle" />
</JobTitle>
<Phone><xsl:choose><xsl:when test = "Phone[.!='']"><xsl:value-of select = "Phone"/></xsl:when><xsl

therwise>n/a</xsl

therwise></xsl:choose>
</Phone>
<Pager><xsl:choose><xsl:when test = "Pager[.!='']"><xsl:value-of select = "Pager"/></xsl:when><xsl

therwise>n/a</xsl

therwise></xsl:choose>
</Pager>
<Email><xsl:value-of select = "Email" />
</Email>
</contact>
</xsl:for-each>
</contacts>
</XML>
<XML ID = "xmlSortEmail">
<contacts>
<xsl:for-each order-by = "+Email"
select = "contact"
xmlns:xsl = "
<contact>
<FirstName><xsl:value-of select = "FirstName" />
</FirstName>
<LastName><xsl:value-of select = "LastName" />
</LastName>
<JobTitle><xsl:value-of select = "JobTitle" />
</JobTitle>
<Phone><xsl:choose><xsl:when test = "Phone[.!='']"><xsl:value-of select = "Phone"/></xsl:when><xsl

therwise>n/a</xsl

therwise></xsl:choose>
</Phone>
<Pager><xsl:choose><xsl:when test = "Pager[.!='']"><xsl:value-of select = "Pager"/></xsl:when><xsl

therwise>n/a</xsl

therwise></xsl:choose>
</Pager>
<Email><xsl:value-of select = "Email" />
</Email>
</contact>
</xsl:for-each>
</contacts>
</XML>
<SCRIPT LANGUAGE="Javascript">
<!--
var xmldoc;
function sort( xsldoc )
{
xmldoc = xmlData.cloneNode( true );
xmldoc.documentElement.transformNodeToObject(
xsldoc.documentElement, xmlData.XMLDocument );
}
-->
</SCRIPT>
<FORM NAME='frmAddress'>
<SELECT NAME="lstFilter">
<OPTION SELECTED="true" VALUE="FirstName">First Name</OPTION>
<OPTION VALUE="LastName">Last Name</OPTION>
<OPTION VALUE="JobTitle">Job Title</OPTION>
<OPTION VALUE="Phone">Phone</OPTION>
<OPTION VALUE="Pager">Pager</OPTION>
<OPTION VALUE="Email">Email</OPTION>
</SELECT>
<INPUT TYPE="text" SIZE="15" NAME="txtFilter" onKeyPress="return checkIt(event);">
<span style='left: -50; top: -50; position: absolute; z-index: 0'><INPUT TYPE="text" SIZE="1" TABINDEX="10"></SPAN>
<INPUT TYPE = "button" ACCESSKEY="f" VALUE = "Filter" onClick = "filter();">
<INPUT TYPE = "button" ACCESSKEY="r" VALUE="Revert" onClick = "revert()">
</FORM>
<TABLE BORDER = "1" DATASRC = "#xmlData" DATAPAGESIZE = "50"
ID = "tbl">
<THEAD>
<TR>
<TH><DIV onClick="sort(xmlSortFirstName.XMLDocument)" CLASS = "head2">First Name</DIV></TH>
<TH><DIV onClick="sort(xmlSortLastName.XMLDocument)" CLASS = "head2">Last Name</DIV></TH>
<TH><DIV onClick="sort(xmlSortJobTitle.XMLDocument)" CLASS = "head2">Job Title</DIV></TH>
<TH><DIV onClick="sort(xmlSortPhone.XMLDocument)" CLASS = "head2">Phone</DIV></TH>
<TH><DIV onClick="sort(xmlSortPager.XMLDocument)" CLASS = "head2">Pager</DIV></TH>
<TH><DIV onClick="sort(xmlSortEmail.XMLDocument)" CLASS = "head2">Email</DIV></TH>
</TR>
</THEAD>
<TR>
<TD><SPAN DATAFLD = "FirstName"></SPAN></TD>
<TD><SPAN DATAFLD = "LastName"></SPAN></TD>
<TD><SPAN DATAFLD = "JobTitle"></SPAN></TD>
<TD WIDTH="15%"><SPAN DATAFLD = "Phone"></SPAN></TD>
<TD><SPAN DATAFLD = "Pager"></SPAN></TD>
<TD><SPAN DATAFLD = "Email"></SPAN></TD>
</TR>
</TABLE>
</BODY>
</HTML>