Image printing problems in IE6

G

Guest

I am having problems with IE6 when it comes to printing pages with images
that are served from other websites. My HTML screen has the HTML code,
<img src="http://server/retrieveimage.aspx?parm1=a&parm2=b">. The
retrieveimage.aspx uses the parameters to query a database and return the
appropriate JPG image, and normally takes 2-5 seconds. When I print (or
choose print preview), instead of printing the image that is displayed on the
screen, it will print the image not found icon. Printing works great in
Netscape and Firefox.

I know the problem occurs because the Print command in IE requests all
images again from the webserver. Is there anything that I can do about this
problem? I have tried using a javascript onBeforePrint and onAfterPrint
events with the hope of delaying of the Print dialog long enough to allow the
images to load, but IE6 appears to not request the images until after these
events run.
 
R

Rob Parsons

Redesign your HTML page and use ASPX instead of just plain html. Design your
aspx page so that it stamps the actual source path to the image file and not
just a bit stream. So on your client the HTML code for the image will look
like

<img src="http://server/images/imgab.jpg">

Your aspx code may look like

<img src="<%=GetImage("a","b")%>"> (note this is asp not aspx.)

Your images have to be stored on the server hard disk, not embedded in a
database. You can still record image views from within the GetImage
function.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top