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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calling text documents into HTML.

Status
Not open for further replies.

dharmachic

Technical User
Dec 18, 2000
24
0
0
US
Hi everyone, I want to create a website that sections of the text can be changed by not having to go into the html. I simply want to create a text document that parts of the webpage will call the info from. I can do this in Flash, but can't seem to figure it out in Dreamweaver.

Anyone know?
 
use javascript to open and get info from a text file

regards Unicorn11
unicorn11@mailcity.com

[red]Luck is not chance, it's toil; fortune's expensive
smile is earned.[red]
 
I would like the text to appear in a tabe within the page- can javascript handle that?
 
You can eather use JavaScript, as unicorn11 mentioned, with several ways. You can also refer to DHTML for that, but this will be some solution only for small text data.

This things are better done using server side scripting (PHP, ASP, JSP, SS JavaScript e.t.c.) or CGI programming (Perl, C, C++...).

I harldy suggest the ladder.
 
Can anyone recommend a good source for such a code, be it javascript or php?
 
According to your last question, you first have to learn some php scripting (basic knowledge whould do for such a thing). But also the web site that hosts your pages must support php. You can learn everything you want about that language straight from it's web site:
But If you cannot for any reason, so I think you will turn to javascript. There are so many resources on the net, that you could easily find from every search engine (I always prefer google to search the net, cause it's the best and the faster).

But I can give you some links:
1)jsworld.com
2)3)javascript.internet.com
4) netscape.com (The creators of JavaScript)
 
Not sure if this will work, I think it's an ASP or VBScript code, but make the text you want in notepad, save it as whatever.txt.

In your HTML document, where you want this text to be, put in this code:

<!-- #include file=&quot;whatever.txt&quot; -->

Tell me if it works. ~Javrix

A broken clock is correct twice per day.

A roomful of monkeys on typwriters will eventually write the great american novel.

If you gave an infinate number of rednecks, an infinate number of shotguns to shoot at an infinate number of street signs, they'd eventually recreate all of Shakespears works in braile.
 
Javrix'idea is gonna work, assuming that the host server supports server side includes. But even this is not so good and may confuse you if you continue add more files in the future.

But this could be a temporary solution, untill you gain some knowledge on php or cgi.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top