Ok, Im back dealing with the same stuff. This time its IEs fault. Pinky promise! :cheese:
Im getting an XSLTProcessor is undefined error in ie7. Im am sure its something with activeX and IE, but I am not sure of a work around. Here is my code.
function showFeed(xmlUrl, xslUrl) {
var feed = document.getElementById('pagecell');
//clear feed div
while(feed.hasChildNodes()){
feed.removeChild(feed.childNodes[0]);
}
//append new htmlfragment
feed.appendChild(getHtmlFragment(xmlUrl, xslUrl));
}
function getHtmlFragment(xmlUrl, xslUrl) {
var xslStylesheet;
var xsltProcessor = new XSLTProcessor();
//load the xml file
var xmlSource = getResponseXml(xmlUrl).responseXML;
//load the xsl file into the xslt Processor
xslStylesheet = getResponseXml(xslUrl).responseXML;
xsltProcessor.importStylesheet(xslStylesheet);
return xsltProcessor.transformToFragment(xmlSource, document);
}
function getResponseXml(xmlUrl) {
var xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", xmlUrl, false);
xmlHttp.send(null);
return xmlHttp;
}
function showFeed(xmlUrl, xslUrl) {
var feed = document.getElementById('pagecell');
//clear feed div
while(feed.hasChildNodes()){
feed.removeChild(feed.childNodes[0]);
}
//append new htmlfragment
feed.appendChild(getHtmlFragment(xmlUrl, xslUrl));
$('#art-info > ul').tabs();
}
And I am pretty sure it has something to do with this part:
function getHtmlFragment(xmlUrl, xslUrl) {
var xslStylesheet;
var xsltProcessor = new XSLTProcessor();
Here is the actual page: http://sf.grantmx.com/sf_goes_gospel_artists_ajax.html.
Of course it works fine in Firefox and Safari, but in IE7 it bombs out. Can anybody help this nob of a person that I am?
Thanks!