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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using an IMG tag to execute a script...

Status
Not open for further replies.

GregLanders

Programmer
Jul 9, 2001
17
US
Hello, I am using an image tag to execute a CF script like this:
Code:
<img src=&quot;abc.cfm&quot; width=0 height=0>
IE is nice and forgiving but NS4.x shows a broken image. My reason for trying this is, I want to be able to execute the ColdFusion from any file type, not just a .cfm file. Any suggestions on getting around the broken image NS4???

Thanks,
Greg
 
Hey Greg,

You just need to make sure the CF script is returning an image for NS to be happy.

Try this inside your script:

<CFCONTENT
TYPE=&quot;image/gif&quot;
DELETEFILE=&quot;NO&quot;
FILE=&quot;d:\spacer.gif&quot;>

You just need to put a transparent gif in the location specified by the &quot;file&quot; attribute. CF will execute the code in the script and return a gif which NS should be happy with.

Hope this helps,
GJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top