Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CFHTTP inside CFOUTPUT?

0 views
Skip to first unread message

fbseattle

unread,
Jan 31, 2003, 2:39:17 AM1/31/03
to
I used to be able to output multiple records and as they displayed get an image from a remote server with the code below... Now my ISP upgraded CF and I can no longer use CFHTTP inside a CFOUTPUT... (worked in CF 4.5 so they must have MX or CF5)

Any idea how I can do this on newer versions of CF.

<cfoutput query="#queryname#" startrow="#Start#" maxrows="#MaxRecords#">
<cfset picture ="no">
<cfset picture1 ="no">
<CFHTTP URL="http://othersite.com/#image#-1t.jpg">
<CFIF LISTFIRST(CFHTTP.MIMETYPE, "/") IS "image">
<CFSET PICTURE1 = "YES">
<CFELSE>
<cfset picture1 = "no">
</cfif>

<cfif picture1 eq "no">
<CFHTTP URL="http://othersite.com/#image#-2t.jpg">
<CFIF LISTFIRST(CFHTTP.MIMETYPE, "/") IS "image">
<CFSET PICTURE = "YES">
<CFELSE>
<cfset picture = "no">
</cfif>
</cfif>
<cfif picture1 eq 'yes'><IMG SRC="http://othersite.com/#image#-1t.jpg">
<cfelseif picture eq 'yes'><IMG SRC="http://othersite.com/#image#-2t.jpg">
<cfelse>NO PHOTO</cfif><br>
</cfoutput>

Thanks


0 new messages