Hi,
On a website, there are products nicely listed with name, description, product code, price and a thumbnail etc.
Now, if you click on a picture thumbnail, a new page called prodwin.php in a new window opens with the product code and for some reason, there is a "no picture available" alt image for every product. The line of code in it:
<td colspan="2"><?php if(file_exists("../pics_p/".$HTTP_GET_VARS["PCode"].".jpg")){?><img src="../pics_p/<?php echo $HTTP_GET_VARS["PCode"] ?>.jpg" alt="Product Picture" galleryimg="no"><?php }else{?><img src="../imgz/nopic.jpg" alt="No Picture Available" width="306" height="200" galleryimg="no"><?php }?></td>
On the other hand, when you click on the product name, it loads a different page called g_browse.php and the product image is nicely there. The line of code in it:
<td height="366" colspan="2" valign="top"><?php if(file_exists("pics_p/".$array[$getVars["index"]]["PCode"].".jpg")){?><img src="pics_p/<?php echo $array[$getVars["index"]]["PCode"] ?>.jpg" alt="Product Picture" galleryimg="no"><?php }else{?><img src="imgz/nopic.jpg" alt="No Picture Available" width="306" height="200" galleryimg="no"><?php }?></td>
$HTTP_GET_VARS["PCode"].".jpg"
- Product code + .jpg will give the image name in pics_p folder.
a JavaScript block which might also be relavant:
function prodWindow(SCode, PCode, PDescription, thePrice)
{
var xPos=(screen.availWidth/2)-490;
var yPos=(screen.availHeight/2)-116;
var s=",top="+yPos+",left="+xPos;
var win=open("scrptz/prodwin.php?SCode="+SCode+"&PCode="+PCode+"&PDescription="+PDescription+"&thePrice="+thePrice,'product', "toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,copyhistory=no,scrollbars=no,height=414,width=316"+s);
win.focus();
}
Hope someone spots the problem.
Regards,
laanes