[thelist] little javascript help requested.

Nicole Parrot nicole at parrot.ca
Sun Apr 15 20:53:33 CDT 2001


> why not dynamically generate a JS file from your html using CGI?
>
> e.g. site B references http://sitea.com/cgi-bin/jsgen?page=/a.html&ext=.js
> site A generates a bunch of document.writes for each line of HTML between
> body tags, the page when rendered from site B includes the HTML from site
A
> (although image references would have to be rendered absolutely instead of
> relatively).

Yeah, that's the way I'm going. I was hoping to avoid that, because my CGI
script already generates 5 versions of what is basically the same file.
(it's the same info, just formatted in a bunch of different ways). I was
hoping I could reuse one of those...

1. write to a flat text file (our "database")
2. write the central html page
3. write a scaled down html page to be inserted via SSI elsewhere in the
site
4. write an xml page
5. write a RSS page
and now I guess I have to add
6. write a .js page to be inserted by outside sites.

There *has* to be an easier way...







More information about the thelist mailing list