Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CFContent Calls HTML pages fine, but how to call images inside too?

Status
Not open for further replies.

promoguy

MIS
Oct 4, 2000
4
US
I am using CFcontent to deliver html pages stored in the webserver root, since I can't protect html pages with passwords & application.cfm.

I can call the html pages fine using code like this:

<cfif ISDEFINED('URL.FileName')>
<cfcontent TYPE =&quot;text/html&quot;
FILE = &quot;<cfelse>

But, of course, the images are all relative to the and are not being called in with the pages.

These html pages are managed by another person using different software and I can't modify their code. And moving the images to where the browser expects them to be is not possible since they are updated often.

Is there any way I can bring in the images along with the html pages?
 
I'm not entirely sure what you're doing, or why on earth you're doing it ;) but you might take a look at the <BASE> tag.

<BASE href=&quot;your document root&quot;> might help resolve relative URLs or SRCs.

Hope it helps,
-Carl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top