I have a program which creates a series of charts, using proc gplot, and then outputs them to an html file. The chart images and html file are all sent to the same folder. I can see that the charts are actually created, and look as they should. But somehow the html doesn't find them and instead gives me the dreaded red X. What could be the problem?
The issue is probably the fact that your HTML file is written to your location in FILE=; BUT, the images are written to your working directory. So if you have this (or something like it):
ods html file='c:\temp\myfile.html';
ods html close;
Then the HTML file would be written to c:\temp, but the images might be some directory like c:\Documents and Settings\etc\etc
One way around it is to use an explicit PATH= and GPATH= option in your code:
ods html path='c:\temp' (url=none)
ods html close;
Since HTML builds an IMG tag that is generally expecting a URL for the image location, the suboption (URL=NONE) tells ODS that the physical location c:\temp should NOT be used to build the IMG tag -- that's because if you move the HTML file and the images to a UNIX web server or a MAC web server or a LINUX web server -- they generally do NOT have a C:\ drive and so you don't want a Windows path in the IMG tag.
But then the issue would be that the image output would be sitting down on your C drive and the hyperlink would not work until both files (the HTML and the Image file) were transferred to the server location.
I find the best solution is to make a directory structure on my local machine that "mimics" the directory structure on the server machine. Then I can use relative names that will work down on my C drive and on the server after I move the files there.