RE: [PHP] PHP's session management screws JavaScripts up?
| From: | Maxim Maletsky | Date: | Thu, 21 Dec 2000 11:01:57 +0000 |
| Subject: | RE: [PHP] PHP's session management screws JavaScripts up? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-31404@lists.php.net to get a copy of this message | ||
these double quote MUST be outputed by PHP with an echo or pint or whatever.
just try to figure out where you have an \" that somehow comes up when not
needed.
Cheers,
Maxim Maletsky
-----Original Message-----
From: Jeroen Wesbeek [mailto:J.Wesbeek@DoWebWeDo.com]
Sent: Thursday, December 21, 2000 7:49 PM
To: php-general@lists.php.net
Cc: dwwd_programming
Subject: [PHP] PHP's session management screws JavaScripts up?
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