Hi I am trying to use something similar for a client showcase. Execpt I wish to make this global, so by using a variable I will be able to show all the screens for that client from the xml file.
So my xml file would look like so:-
<clients>
<client>
<company>Client One</company>
<image>/images/c1/1.jpg</image>
<image>/images/c1/2.jpg</image>
<image>/images/c1/3.jpg</image>
</client>
<client>
<company>Client Two</company>
<image>/images/c2/1.jpg</image>
<image>/images/c2/2.jpg</image>
<image>/images/c2/3.jpg</image>
</client>
</clients>
Show if say the client was client one, then
each of the images would be show for client one. But I am not sure how to approach this, what its doing at the moment is trying to loop between each client.
Does anyone know.
Its this element I think will need modification.
//Load XML
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("/xml/clients.xml");
Any help would be nice.
Thanks