sessions & javascript problem
| From: | Matthew Delmarter | Date: | Thu, 08 Feb 2001 02:39:47 +0000 |
| Subject: | sessions & javascript problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-38658@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 :)
Regards,
Matthew Delmarter