[thelist] Problems with a php script being brought in as an external Javascript file...

Chris George chrisg at gsnet.com
Tue Apr 30 17:30:00 CDT 2002


Hey all...

A little while ago I was working on a site that is hosted on a gimpy server
with no custom server side scripting capabilities. So what I did was create
a 'news' feature for their site that got called like an external js file...
I thought all was good except that in NN 4.7 the news section shows up empty
(it breaks with a  Javascript error)...

Here is the site:

http://www.hub-marketing.com/

The file that gets rendered is here:

http://www.bluspherestudio.com/php/news/remotenews.php

I've taken into account apostrophe's with addslashes() and also replaced
returns with <br>'s...

$newsText = ereg_replace("(\r\n|\n|\r)", "<br>",$newsText);

I'm guessing I'm not escaping out a character that appears in that
particular news release, but I have no idea what - I suck at Javascript.
I've put in just regular text and some breaks and it works fine...

Can anyone shed some light on this?

Huge thanks in advance!

Chris.




More information about the thelist mailing list