PHP changing my JavaScript??

From: Date: Mon, 29 Oct 2001 10:41:51 +0000
Subject: PHP changing my JavaScript??
Groups: php.general 
Request: Send a blank email to php-general+get-72701@lists.php.net to get a copy of this message
Hi All, got a strange problem with a PHP include file that contains all my JavaScript functions. This file is included on every page in my site and contains some image swap behavious amongst other things. The first time I go into the site, however, I get all sorts of JavaScript errors which I have traced to the fact that lots of quotes are being dumped into the JavaScript for some reason, screwing up the syntax. As soon as I hit refresh, the quotes disappear and the page loads fine.... anyone got any ideas as to why this is happening?? example of screwed up script: var d="document;" if(d.images){ if(!d.MM_p) d.MM_p="new" Array(); var i,j="d.MM_p.length,a=MM_preloadImages.arguments;" for(i="0;" i<a.length; i++) this is how it should look: var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) any ideas at all much appreciated! -- Moloko 'When the going gets weird, the weird turn pro' - Dr Gonzo GCM/CS/IT/MC d-- S++:- a-- C++ U--- P+ L !E W+++$ N+ K+ w+++$ M+ PS+++ PE- PGP- t+ 5- X-- R* tv++ b+++ DI++++ D G e h-- r++ y++

« previous php.general (#72701) next »