I have this hacked together code from some webpage that works in some versions of IE (but not the latest) and does not work in Firefox, etc.
Another (but less pressing) issue is setting the value to ZZZ if there is no query string. It works if I do an if/else statement on this line:
But only if it has a query string with no value (?Code=), not if there is nothing at all.
urlstring = location.href;
qrystring=urlstring.substring(urlstring.indexOf("=") + 1, urlstring.length);
//Passing XSL variable
var xml = new ActiveXObject("MSXML2.DomDocument.4.0");
xml.async = false;
var xsl = new ActiveXObject("MSXML2.FreeThreadedDomDocument.4.0");
xsl.async = false;
var template = new ActiveXObject("MSXML2.XSLTemplate.4.0")
template.stylesheet = xsl;
processor = template.createProcessor();
processor.input = xml;