View Full Version : Image loading issue

05-13-2008, 02:37 PM
I've set up a dynamic product page with a table that pulls info from a dbase based on which product you want to view. Yesterday, I set up the link for the image in a cell in the table and it wouldn't work. I then inserted the image below the table and it magically started working in both locations. So that particular product works. Try a new one and same thing, it won't load into the table until I've "hard" inserted into the page once.

Now I've tried to use an alt image that I cannot get to show up in the table even if I've "hard" inserted it. My images are not stored in the db, only the file names. I haven't played with html for years, what's happening?? I've checked to ensure the images have been uploaded to my WAMP server. Is there some syntax I'm missing or a DW setting I've got wrong?

This is what I'm trying to get to work.

<td width="180" rowspan="4"><div align="center"><img src="images/products_2/<?php echo $partnum?>_2.jpg" alt="images/products_2/NoImage_125.jpg" width="125" height="125" /></div> <div align="left"></div></td>

Code for the "hard" coded image that does successfully show the image below the table.

<p><img src="images/products_2/NoImage_125.jpg" width="125" height="125" /></p>

Any and all assistance is greatly appreciated.

05-14-2008, 01:26 AM
does this produce a value elsewhere on your page?
<?php echo $partnum?>

05-14-2008, 01:47 PM
Yes, I can echo back the $partnum variable. I'm still baffled as to why the path shows up correctly in the "veiw source" when I open the page in IE and the jpg file is in the server directory, but doesn't load into the page. Any other thoughts??


05-15-2008, 12:48 AM
thts not in your hard code. typo or intentional?

05-15-2008, 01:30 PM
That's intentional. I was having the issue of the image not showing when I first tested the page. It may be a quirk with IE, but it all seems to be working now. Another thing I was trying to do was load a generic "No Image Available" image if the original image didn't exist. From what I've researched, that is not possible using the alt attribute, but probably possible with PHP I guess. So I went in and populated my dbase with all of the generic image names and then I'll replace them with the actual images as I get them created. All seems well for now. Thanks for your assistance.