Re: PHP's session management screws JavaScripts up?

From: Date: Thu, 21 Dec 2000 11:01:42 +0000
Subject: Re: PHP's session management screws JavaScripts up?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-31402@lists.php.net to get a copy of this message
Check whether this still exists in 4.0.4 and post a bug report at http://bugs.php.net At 11:48 21.12. 2000, Jeroen Wesbeek wrote the following: -------------------------------------------------------------- >Hello, > >We have several problem with php's (4.0.3.pl1) session management system >which we use quite >intensively. When starting to browse a session site (session autostarts en >trans-id is enabled) php >adds the session id to links (the cookie is not yet present), which should >be quite okay. However >links which contain GET vars of themselves might get screwed up when php >inserts the session id; >that's problem 1. >Another problem is that php also changes the JavaScript which is in the >page. This problem, however, >can be solved by changing the double quotes into single quotes. I think you >will agree this is just a >workaround and generally you would like to use whatever JavaScript you like >in your page and don't >have php changing it. >The third problem is a little bit more bizar, check this JavaScript code: > >function MM_swapImgRestore() { //v3.0 > var i,x,a=document.MM_sr; > for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) >x.src=x.oSrc; >} > >PHP turns this into: > >function MM_swapImgRestore() { //v3.0 > var i,x,a=document.MM_sr; > for(i=0;a&&i<a.length&&(x="a[i])&&x.oSrc;i++)" >x.src="x.oSrc;" >} > >Take a good look at the double quotes. Quite bizar isn't it? >Any possible solution(s)? > > >Greetings, > > >dowebwedo >Jeroen Wesbeek >.programming >St. Jacobsstraat 16 >Postbus 448 | 3500 AK Utrecht >The Netherlands >p 030 2348110 | f 030 2348605 > > > > >[roses are red, violets are blue, > I am schizophrenic and so am I ] > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net >For additional commands, e-mail: php-general-help@lists.php.net >To contact the list administrators, e-mail: php-list-admin@lists.php.net ------end of quote------ ____________________________________________________________ Cynic: A member of a group of ancient Greek philosophers who taught that virtue constitutes happiness and that self control is the essential part of virtue. cynic@mail.cz

« previous php.general (#31402) next »