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!

I am trying to generate HTML code f 1

Status
Not open for further replies.

ahksar

Programmer
Jan 11, 2001
43
US
I am trying to generate HTML code for a news submission page. Once the news is submitted and when I select any item, I want to generate the related fields along with HTML, so that I can just cut and paste into a web page for viewing.
For example,
<p><font size=&quot;1&quot;>
MIDDLE EAST/PRESS FREEDOM</font>:<br><a href=&quot;
Palestinian Officials Returned Confiscated AP Videotape With Sections Edited</a><br>
&quot;Palestinian officials yesterday returned a videotape they had confiscated two days earlier from the Associated Press — after portions of a protest rally led by the militant Islamic group Hamas had been deleted.&quot;<br>
September 17, 2001<br>

The urls, headers, summaries, etc are obtained from the database, but how can I make the html formatting to show along with these?

Any ideas on how this is possilbe will be useful.
Thanks
ahksar
 
I am not quite sure what you are looking for here, if you mean, that you want to display the above code into a textarea field, and keep the <BR> and all of the font information then you could do this

<!---set a variable to the result of your db pullout--->
<CFSET a ='<p><font size=&quot;1&quot;>
MIDDLE EAST/PRESS FREEDOM</font>:<br><a href=&quot;
Palestinian Officials Returned Confiscated AP Videotape With Sections Edited</a><br>
&quot;Palestinian officials yesterday returned a videotape they had confiscated two days earlier from the Associated Press — after portions of a protest rally led by the militant Islamic group Hamas had been deleted.&quot;<br>
September 17, 2001<br>'>

<cfoutput>
#HTMLCodeFormat(a)#
</cfoutput>

This will display the information unchanged and keeping all of the HTML tags that you have unprocessed.

Hope this helps !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top