tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Smith Norton" <>
Subject 2 session variables JSESSIONID retrieved by JavaScript
Date Wed, 17 Jan 2007 05:53:07 GMT
This strange thing is happening in Internet Explorer 6

I use a simple JavaScript like this to read a cookie and set it back.
Ideally, it shouldn't alter the cookie value.

function setCookie()
	alert('Cookie: ' + frmCookie.cookieString.value + '; path=/' +
		'\n\nThis cookie is set.\nCookie display will now refresh.')

frmCookie.cookieString is a TEXTAREA being displayed in the webpage
itself, so that the user can see what cookie is being set.

The problem that occurs is that initially, the text area shows
something like this:-


After hitting the button that fires that script, the textarea shows:-


The problem is rectified when I change the first line of the script to:-

function setCookie()
	document.cookie=frmCookie.cookieString.value + '; path=/'
        // Notice the extra 'path' information.

Can any one explain what's going wrong in the first case?

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message