Welcome to WebmasterWorld Guest from 54.160.163.163

Forum Moderators: open

Message Too Old, No Replies

Grabbing data from another site

     

Schoolbag

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

10+ Year Member



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?

CloudLong

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

10+ Year Member



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.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month