The question involves a page that is using CF to pull data from a
mssql db and return it through a .dcr file.
The instructions in the admin section state that any html tags can be
used, but when I input an image, using a full image url, instead of
the image returning, the html code is printing out.
The relevant sections of code are below.
Ideas anyone on how to adjust the code to insure the image prints??
david
query ...
<cfset textString = "">
<cfquery datasource="#application.dsn#" name="getSubjects">
SELECT subjectId, subjectName
FROM subjects
ORDER BY subjectId
</cfquery>
<cfoutput query="getSubjects">
<cfquery datasource="#application.dsn#" name="getQuestions">
SELECT questionId
FROM questions
WHERE active = 1 AND subjectId = #subjectId# AND gradeId =
#session.gradeLevel#
ORDER BY questionId
</cfquery>
<cfset textString = #textString# & #replace(subjectName, " ", "",
"ALL")# & ":">
<cfloop query="getQuestions">
<cfif getQuestions.currentRow eq getQuestions.recordCount>
<cfset endChar = ":">
<cfelse>
<cfset endChar = ",">
</cfif>
<cfset textString = #textString# & #questionId# & #endChar#>
</cfloop>
<cfif getQuestions.recordCount lt 2>
<cfset gameError = "Yes">
</cfif>
</cfoutput>
<cfif isDefined('url.sId') AND isNumeric(url.sId)>
<cfquery datasource="#application.dsn#" name="getStart">
SELECT subjectName
FROM subjects
WHERE subjectId = #url.sId#
</cfquery>
<cfset startingSubject = #replace(getStart.subjectName, " ", "",
"ALL")#>
<cfelse>
<cfset startingSubject = "NULL">
</cfif>
</cfif>
output ...
<cfoutput>
<object classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/director/
sw.cab##ver sion=7,0,2,0" width="550" height="400">
<param name="src" value="xxx.dcr">
<param name="sw1" value="#startingSubject#">
<param name="sw2" value="#LEFT(textString, newText)#">
<embed src="xxx.dcr" pluginspage="http://www.macromedia.com/shockwave/
download/" width="550" height="400" sw1="#startingSubject#"
sw2="#LEFT(textString, newText)#"></embed>
</object>
</cfoutput>