Re: PHP changing my JavaScript??

From: Date: Mon, 29 Oct 2001 12:25:55 +0000
Subject: Re: PHP changing my JavaScript??
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-72704@lists.php.net to get a copy of this message
it happened to me when i enter the page for the very first time and I use session_start() I suggest to make the page reload itself w/ a parameter so that the first pass to the site will screw the javascript and then automatically 2nd pass (which is self called) is okay. "Moloko" <moloko5@theglobe.com> wrote in message news:20011029104152.6065.qmail@pb1.pair.com... > 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 (#72704) next »