Welcome to WebmasterWorld Guest from 23.20.147.6

Forum Moderators: open

Message Too Old, No Replies

Grabbing data from another site

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

Junior Member

10+ Year Member

joined:Jan 19, 2003
posts:63
votes: 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:

document.writeln('blah
blah
blah
blah');

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)

New User

10+ Year Member

joined:Dec 25, 2003
posts:29
votes: 0


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

document.writeln('blah \
blah \
blah \
blah');

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

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members