Churc, obrigado pela resposta. O acesso local realmente é o problema, tentei fazer como você disse porem obtive o mesmo erro. Irei postar meu código: window.onload = initPage;
function initPage()
{
//Localiza as miniaturas da página
thumbs = document.getElementById("thumbnailPane").getElementsByTagName("img");
//Define a sub-rotina para cada imagem
for(var i = 0; i < thumbs.length; i++ )
{
image = thumbs[i];
//Cria a função onclick
image.onclick = function()
{
//Localiza o nome da imagem com tamanho real
detailURL = 'images/' + this.title + '-detail.jpg';
document.getElementById("itemDetail").src = detailURL;
//Define a sub-Rotina para cada imagem
getDetails(this.title);
}
}
}
function getDetails(itemName)
{
request = createRequest();
if (request == null)
{
alert("Erro");
return;
}
var url = "./getDetails.php?ImageID=" + escape(itemName);
request.open("GET",url,true);
request.onreadystatechange = displayDetails;
request.send(null);
}
function createRequest()
{
try
{
request = new XMLHttpRequest();
}
catch (tryMS)
{
try
{
request = new ActiveXObject("Msxm12.XMLHHTP");
}
catch (otherMS)
{
try
{
request = new ActiveXObject("Microsoft.XMLHTTP");
}
catch(failed)
{
request = null;
}
}
}
return request;
}
function displayDetails()
{
if (request.readyState == 4 )
{
if (request.status == 200)
{
detailDiv = document.getElementbyId("description");
detailDiv.innerHTML = request.responseText;
}
}
}
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Rob's Rock 'n' Roll Memorabilia</title>
<link rel="stylesheet" href="css/default.css" />
<script src="thumbnails.js" type="text/javascript"></script>
</head>
<body>
<div id="wrapper">
<img src="images/logotypeLeft.png" alt="Rob's Rock 'n' Roll Memorabilia" width="394"
height="91" id="logotypeLeft" />
<img src="images/logotypeRight.png" alt="Rob's Rock 'n' Roll Memorabilia" width="415"
height="92" id="logotypeRight" />
<div id="introPane">
<p>
<span id="result_box"><span onmouseover="this.style.backgroundColor='#ebeff9'" title="Are you looking for the perfect gift for the rock fan in your life?"
onmouseout="this.style.backgroundColor='#fff'">Você está procurando
o presente perfeito para um fã de rock na sua vida? </span><span onmouseover="this.style.backgroundColor='#ebeff9'"
title="Maybe you want a guitar with some history behind it, or a conversation piece for your next big shindig."
onmouseout="this.style.backgroundColor='#fff'">Talvez você queira uma guitarra
com alguma história por trás dela, ou uma parte de conversa para o
seu próximo grande baile. </span><span onmouseover="this.style.backgroundColor='#ebeff9'"
title="Look no further!" onmouseout="this.style.backgroundColor='#fff'">Não
procure mais! </span><span onmouseover="this.style.backgroundColor='#ebeff9'" title="Here you'll find all sorts of great memorabilia from the golden age of rock and roll."
onmouseout="this.style.backgroundColor='#fff'">Aqui você vai encontrar todos
os tipos de memorabilia a partir da idade de ouro do rock and roll!<br />
<br />
</span><span onmouseover="this.style.backgroundColor='#ebeff9'" title="Click on an image to the left for more details"
onmouseout="this.style.backgroundColor='#fff'">Clique na imagem à esquerda
para obter mais detalhes</span></span>!</p>
</div>
<div id="thumbnailPane">
<img src="images/itemGuitar.jpg" width="301" height="105" alt="guitar" title="itemGuitar"
id="itemGuitar" />
<img src="images/itemShades.jpg" alt="sunglasses" width="301" height="88" title="itemShades"
id="itemShades" />
<img src="images/itemCowbell.jpg" alt="cowbell" width="301" height="126" title="itemCowbell"
id="itemCowbell" />
<img src="images/itemHat.jpg" alt="hat" width="300" height="152" title="itemHat"
id="itemHat" />
</div>
<div id="detailsPane" style="left: 338px; top: 347px">
<img src="images/blank-detail.jpg" width="346" height="154" id="itemDetail" />
</div>
</div>
</body>
</html>