Jump to content

JPG images do not display on web page


K_Drive

Recommended Posts

Hello.I thought that I would post this seemingly small issue to this board because it has us baffled, and I have received good help in the past from this Forum.I am working on a web application with a friend of mine. One page is displaying some small images...or, it is supposed to display them. There is an HTML table with some JPG images in the first column of cells. It is nothing tricky. But, the JPG images do not display when the application is running.If I copy the HTML table code that the images are in, and then paste it all into a plain HTML page, the images display like they are supposed to.I did two screenshots and put them on a Geocites web page. The first shot on the top of the web page is the table with the images on the the application page. The second screenshot is the table with the images in an HTML page.I am running MS Vista Home Premium and IE 7.JPG images and other images display normally when I am out on the Internet or in other web pages that I have created.Is there something obvious that I am missing here?Link To Geocites page with screenshots.Sincerely,K_Drive

Link to comment
Share on other sites

Dude, we need code. You're going to have to reveal at least some of the code of the application you're working with.If you can't do that for whatever reason, try do so some self debugging. Get Opera, and install DOM snapshot to view the tree the way the browser sees it.If it's only an IE problem, get IE8b1 or keep IE7, and get the IE developer toolbar. In it, look at the DOM tree.In either case, look carefully whether the "src" attributes on the image elements are generated by JavaScript, and whether they point to the right location.

Link to comment
Share on other sites

I would imagine it's a path problem. Is the "web application" in the same directory as the plain html file? Is there something in the way the web app is built that would cause the "baseref" to change?You might mouse one of the broken image icons and find out what if there's a difference between the path you think is being pointed to and the path that is actually being pointed to.

Link to comment
Share on other sites

Here is the code for the image element:

<img id="ctl00_PageContentHolder_dgGroupManagePhoto_ctl03_Image1" src="C:\_myQTownApp\ConsumerApp\ConsumerWeb\UploadGroupFile\30\EventAlbum\21_s\s_200843172346Caddy_1969_convertable.jpg" style="border-width:0px;" />

If I use it on an HTML document, the path is the same. I am running the app on my computer right now.(I am running a C# web app on my computer with MS SQL Server and MS Visual Studio. My friend is doing the C# coding. I am doing some HTML/CSS/Javascript.)If I right-click on a broken image, the small window lists that the image is "Not Avaialble".K_Drive

Link to comment
Share on other sites

Relative linking is always better than absolute (what if your drive label changes to D?).If you put the file in the document root you can reference it as such

src="/s_200843172346Caddy_1969_convertable.jpg"

If it is in the same directory make it

src="s_200843172346Caddy_1969_convertable.jpg"

Link to comment
Share on other sites

To everyone that replied: Thank you very much.The guy who actually coded this (and picked those names which make perfect sense to him) thinks that it is something with the order in which the image paths are being generated by the C# code. He told me that he has it working now and will forward the new code to me soon.If it doesnt' work, I'll be back here soon.Sincerely,K_Drive

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...