homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

Grabbing data from another site

 10:37 pm on Dec 29, 2003 (gmt 0)

Im currently using the following code to grab data from a plain text file on another website:

<script src="http://www.blah.com/files/header.txt"></script>

The header.txt file has the following data:

document.writeln('blah blah');

It works correctly BUT, if I have carriage returns in the data file like so:


tt will not work. Any ideas of a better way to do this? A different javascript?



 11:18 pm on Dec 29, 2003 (gmt 0)

if I understand you correctly, then below must be the solution

document.writeln('blah \
blah \
blah \

add the "\" will tell them the script continue at new line.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved