If you are to use the:
http://www.dynamicdrive.com/dynamicindex11/ajax.htm
script as written, you need to change the icon tags to img tags:
Code:
<?xml version="1.0" encoding="utf-8"?>
<icons>
<img src="images/thmbs/set29.jpg" alt="Set 28" title="POSTED 5-27-08"/>
<img src="images/thmbs/set27.jpg" alt="Set 27" title="POSTED 5-23-08"/>
<img src="images/thmbs/set30.jpg" alt="Set 26" title="POSTED 5-20-08"/>
</icons>
Let's call that img.xml. And, to work locally, you need a slight modification to the script:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
/******************************************
* Ajax load XML file script -- By Eddie Traversa (http://dhtmlnirvana.com/)
* Script featured on Dynamic Drive (http://www.dynamicdrive.com/)
* Keep this notice intact for use
******************************************/
function ajaxLoader(url,id)
{
if (document.getElementById) {
var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
}
if (x)
{
x.onreadystatechange = function()
{
if (x.readyState == 4 && (x.status == 200 || !/^http/.test(location.href)))
{
el = document.getElementById(id);
el.innerHTML = x.responseText;
}
}
x.open("GET", url, true);
x.send(null);
}
}
</script>
</head>
<body onload="ajaxLoader('img.xml','contentLYR')">
<div id="contentLYR">
</div>
</body>
</html>
Here's a demo:
http://home.comcast.net/~jscheuer1/side/xml_img/
However, since you didn't give us the paths to the images, all you will see are the alt values.
Bookmarks