//function sets the images, and the 'page processing' message var path; //global function pic_zoom(pth,id) { path = pth; set_inner_html('picZoom','Loading Photo'); //clear old img out, or give a 'loading' message if(document.getElementById('picZoom')) { document.getElementById('picZoom').style.visibility = 'visible'; document.getElementById('picZoom').style.display = 'block'; } next_function = 'get_result'; //build url of PHP page to read from //MAKE DAMN SURE THIS POINTS TO THE RIGHT FILE, GET THE PATH RIGHT YOU DORK! var url = path + 'ajax/picZoom.php?id=' + id; //alert(url); http_process(url); // function in ajaxBase, which then calls "next function" below } //this is the function with MAJOR customizatioin each time function get_result() { //no loop, we are only update one record at at time var i = 0; //XML document ALWAYS start at 0, and our array normally starts at 1, so use i-1 // do a check to make sure we got result set back... if(xmlDocument.getElementsByTagName('img').item(i)) { var tempImg = xmlDocument.getElementsByTagName('img').item(0).firstChild.data; var tempImgNum = xmlDocument.getElementsByTagName('imgNum').item(0).firstChild.data; var tempW = xmlDocument.getElementsByTagName('w').item(0).firstChild.data; var tempH = xmlDocument.getElementsByTagName('h').item(0).firstChild.data; var tempResult = xmlDocument.getElementsByTagName('result').item(0).firstChild.data; if(tempResult =="SUCCESS") { var tempSrc = path+'img/'+tempImg; var tempData = 'height="'+tempH+'" width="'+tempW+'" border="0"'; var combo = ''; var lnk = ''+combo+''; set_inner_html('picZoom',lnk); } else { set_inner_html("picZoom",""); } } }