 |
 |
Can use INCLUDE to pull formatted ttext or does it have to be plain txt.
|
 |
|
 |
|
Mac Elite
Join Date: Jun 2001
Location: NYNY
Status:
Offline
|
|
I used this line below to pull text from an external file and worked great.
------------> < !--#include file="sample.txt"-->
Does anyone know if I can format or delimit that text in anyway or does it have to be just plain txt.
|
|
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Nov 1999
Status:
Offline
|
|
The server doesn't care what format the file is in. And the browser doesn't even know that you included anything; it all looks like one big HTML file. So if your included file has HTML code in it, the browser will render it just like any other HTML code.
Just make sure that once all your includes are all in place, the code still validates.
|
|
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Jun 2001
Location: NYNY
Status:
Offline
|
|
Originally posted by Millennium:
<STRONG>The server doesn't care what format the file is in. And the browser doesn't even know that you included anything; it all looks like one big HTML file. So if your included file has HTML code in it, the browser will render it just like any other HTML code.
Just make sure that once all your includes are all in place, the code still validates.</STRONG>
Thanks
I'm trying to set it up so a client can update certain sections of the site themselves, hopefully by simply uploading a document that would overwrite the existing document that is being included.
assuming they only have MS Word to work with..could they save the document as sample.rtf for instance or sample.html and retain the formatting they have applied to the document?
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Oct 2000
Location: Toronto, ON
Status:
Offline
|
|
It has to be plain text or HTML, not RTF.
So yes, they could take their Word document, Save As HTML, and put it on the server, and you include would work (provided the include command matched the document filename, obviously). The only thing is that Word makes absolutlely crappy HTML from its Save As command, and the newer versions are worse than ever, including custom stylesheets and XML commands. These may screw up the rest of your page, only experimentation will tell you if it does or not.
|
|
The Lord said 'Peter, I can see your house from here.'
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Nov 1999
Status:
Offline
|
|
Originally posted by ReggieX:
<STRONG>It has to be plain text or HTML, not RTF.
So yes, they could take their Word document, Save As HTML, and put it on the server, and you include would work (provided the include command matched the document filename, obviously). The only thing is that Word makes absolutlely crappy HTML from its Save As command, and the newer versions are worse than ever, including custom stylesheets and XML commands. These may screw up the rest of your page, only experimentation will tell you if it does or not.</STRONG>
Actually, it's even worse than that. The Save As HTML command in basically any editor out there at the moment saves as a complete HTML page. This isn't what you want; an include file should contain HTML fragments (only rarely do you really want to include a full HTML file).
|
|
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Mar 2002
Location: Brisbane, Australia
Status:
Offline
|
|
But do the extra html codes cause any problems. We are running IIS and some of the include pages are full html files and I haven't seen any probs.
|
|
_ _ _______ _ _
is this where the signature goes?
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2001
Status:
Offline
|
|
That's usually fine if you have full html pages within html.
Also, if you have ASP code in your text file then make sure you have the <% and %> tags completely within the text file. You should name the files .asp just in case someone pulls up the file by itself - your server won't spill the guts of the logic - just the results.
If you're not using ASP then don't worry about anything I said cause it won't apply.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|