Re: sessions & javascript problem

From: Date: Thu, 08 Feb 2001 10:10:18 +0000
Subject: Re: sessions & javascript problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-38701@lists.php.net to get a copy of this message
> I have an interesting problem with sessions (using enable-trans-sid). > > I have created a page with the following javascript function on it: > > function swapImgRestore() { > var i,x,a=document.sr; > for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) > x.src=x.oSrc; > } > > However when I disable browser cookies the code is altered by > enable-trans-sid - notice the "" : > > function swapImgRestore() { > var i,x,a=document.sr; > for(i=0;a&&i<a.length&&(x="a[i])&&x.oSrc;i++)" > x.src="x.oSrc; > " > > Why does enable-trans-sid do this? It effectively stuffs up the javascript. > Anyone know a solution, other than rewriting the javascript :) As a short-term hack, try adding some spaces in there (just around your && and after ; in for() for example) ... Fill out a bug report at http://bugs.php.net -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm

« previous php.general (#38701) next »