On Fri, Sep 24, 2010 at 9:43 AM, Richard  Steele <[email protected]> wrote:
>
> Is it possible to package an image with a link and request it from a 
> non-coldfusion website? I know that I can use cfcontent to stream a jpg file 
> using a <img src> request, but can I use cfcontent and pull the html <a href> 
> and <img src> to show the image with its associated link? Thanks in advance.

the image and the HTML are completely separate of course so you really
can't it with a single request.

You'd only be able to do it with javascript or an iframe.

<script type="text/javascript" src="http://domain/foo.js";></script>

foo.js :

document.writeln('<a href="link"><img src="http://domain/foo.jpg";></a>');

and of course foo.jpg could be foo.cfm if you need to dynamically
generate the image as well.

You could also dynamically generate the javascript of course (which
seems likely)


<script type="text/javascript" src="http://domain/foo.cfm";></script>

Rick

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337468
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to