Advertisement

02.20.2008 at 06:45PM PST, ID: 23179982 | Points: 500
[x]
Attachment Details

Dispay text file in internet browser with formating (coldfusion)

Asked by aliasim99 in Cold Fusion Markup Language, Hypertext Markup Language (HTML), Dynamic HTML (DHTML)

Is it possible to display Text file content with it's formating in internet browser?

I was using this code and the file was fairly readable and formated

<cffile          
action = "read"
file ="#qry_doc_location.DOCUMENT_LOCATION#"
variable = "Message">
<cfset newMess = Replace(Message, chr(10),'<br />', "ALL")>

It was all good untill we had to display XML file.  I could not display XML tags. Even the EDI was fairly formated with the above code.

Then I made a change by comenting out the cfset above and adding the line below.

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

This did wonders for me and XML looked great and so did EDI. EDI looked even better.

But now simple formated text file looks like a paragraph. I cannot define what type of file it is because usually a DOT dat (.dat) file and it can have XML, EDI or Text data.

I tried CF content but no help. XML looks good but then I dont have the look and feel of a website. and Text still looks like a paragharph all Tabs and stuff is gone.

Any ideas or workarounds?



Start Free Trial
 
Keywords: Dispay text file in internet browser wit…
 
Loading Advertisement...
 
[+][-]02.20.2008 at 06:57PM PST, ID: 20944589

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.20.2008 at 07:11PM PST, ID: 20944674

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628