here is what flickr_fetchImageInfo.php returns to be eval'd: {info: ok, title: img_1248, description: morning glory, comments: 2, uploaded: September 12, 2006} here's the js: var ajaxObj; var image_info; if (window.XMLHttpRequest) { ajaxObj = new XMLHttpRequest(); } else if (window.ActiveXObject) { ajaxObj = new ActiveXObject("Microsoft.XMLHTTP"); } function fetchInfo(id) { ajaxObj.open("get","flickr_fetchImageInfo.php?id="+id,true); ajaxObj.onreadystatechange = function() { if (ajaxObj.readyState == 4 && ajaxObj.status == 200) { image_info = eval(ajaxObj.responseText); update_info(); } } ajaxObj.send(null); } function update_info(title,comments,dateuploaded){ var info = document.getElementById("info"); var response = image_info[0].info; alert(response); if (response == "ok") { info.innerHTML = ""; info.innerHTML += "Title: "+image_info[0].title+""; info.innerHTML += "Comments: "+image_info[0].comments+""; info.innerHTML += "Uploaded on: "+image_info[0].uploaded+""; } else { info.innerHTML = "ERROR: " + image_info[0].error; } }