Forum Moderators: open

Message Too Old, No Replies

photo gallery

         

consideroptions

10:32 pm on Mar 17, 2006 (gmt 0)



Hi there. I'm trying to make a photo gallery that takes in an XML file and puts all the pictures on the page. This is what I have so far. The trouble is that I don't really know how to load an XML file properly. This is the relevant code for how I'm doing it now:

var xmlDoc

function loadXML(url){
if (document.implementation && document.implementation.createDocument)
{
xmlDoc = document.implementation.createDocument("", "", null);

}
else if (window.ActiveXObject)
{
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.onreadystatechange = function () {

};
}
else
{
alert('Your browser can\'t handle this script');
return;
}

xmlDoc.async=false;
xmlDoc.load(url);
}

I think work with xmlDoc to display the photos. This script works for IE, Firefox, and Konqueror, but it doesn't work for Safari. Is there a better way to do this that gives the same results?

benlieb

3:33 am on Mar 23, 2006 (gmt 0)

10+ Year Member



I don't really know the answer, but I think you might want to repost with "XML" in the subject line, since you want to peek the interest of those interested in XML. : )