[thelist] little javascript help requested.

TFN Nic nparrot at nparrot.com
Sun Apr 15 19:06:57 CDT 2001


I've seen on some sites a little javascript code that allows to pull in some
external file. The Weather Channel has something like that, but they don't
pull it via javascript.

Example of what I have in mind:
site A has a little HTML file that is "published".
Site B wants to use it on its main page.
Site B puts in code that resemble this:
<SCRIPT LANGUAGE="Javascript"
SRC="http://www.siteA.net/outnews/news.js"></SCRIPT>

news.js should be doing the following.
read in the file from site A
do a document.write onto the user's browser.

Can it even be done? I'm almost positive I saw it in action somewhere, but I
can't remember. I'm doubting my own memory now.... Any other solution that
is crossbrowser would be appreciated.

Nicole






More information about the thelist mailing list