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!

javascript read file rtf

Status
Not open for further replies.

CoolBreeze007

Programmer
Aug 5, 2008
6
US
I am new to javasccript. I would like to read a .rtf file from the server ( and then insert the contents of the file into my html document. I have searched and searched and searched for examples on the net, but have found nothing.

Any help?
 
CoolBreeze007 said:
I have searched and searched and searched for examples on the net, but have found nothing.

That's because you can't, javascript cannot on its own read content from other websites.

You can use an <object> HTML tag to embed the RTF file into the website if you want, but not all browsers support this.

The other option is to use a server side programming language to get the RTF from wherever it is, and then add it to the html served for your website.

An ajax request may work, if the website the file is stored in allows it.


----------------------------------
Phil AKA Vacunita
----------------------------------
OS-ception: Running Linux on a Virtual Machine in Windows which itself is running in a Virtual Machine on Mac OSx.

Web & Tech
 
Java script doesn’t read the content from other websites.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top