Hi,
I am using javascript for creating a cookie with the following code
function setcookie(name,value)
{
if(typeof document.cookie == "string")
{
var cookiestring=name+"="+escape(value)+"; EXPIRES=0" ;
document.cookie=cookiestring;
}
else
{
alert("Document is NOT a string");
}
}
The above script is perfectly running in IE6 with cookies as ENABLE as standalone and creating cookie on clients machine, by just creating a simple html file and adding the above code.
But when I add the above code in my application in HTML page which consists of js,css files imported in that html. I am running on localhost and tomcat as server on IE6 version.
By adding the above code, in the application, it is showing me "Document is not a String" alert(going in else loop) while running and document.cookie is replaced document.ignore, when i viewed the code and NOT able to store cookies to client machine.
Pls provide me with suitable solutions to solve the problem of document.ignore in javascript
Hi,
I am using javascript for creating a cookie with the following code
function setcookie(name,value)
{
if(typeof document.cookie == "string")
{
var cookiestring=name+"="+escape(value)+"; EXPIRES=0" ;
document.cookie=cookiestring;
}
else
{
alert("Document is NOT a string");
}
}
The above script is perfectly running in IE6 with cookies as ENABLE as standalone and creating cookie on clients machine, by just creating a simple html file and adding the above code.
But when I add the above code in my application in HTML page which consists of js,css files imported in that html. I am running on localhost and tomcat as server on IE6 version.
By adding the above code, in the application, it is showing me "Document is not a String" alert(going in else loop) while running and document.cookie is replaced document.ignore, when i viewed the code and NOT able to store cookies to client machine.
Pls provide me with suitable solutions to solve the problem of document.ignore in javascript
I have also checked this site "http://www.jibbering.com/faq/faq_notes/cookies.html" with the "typeof" but still it is going in else loop....and not accepting (typeof document.cookie=="string")
Hi,
Visit this site for more details regarding document.ignore
"http://www.jibbering.com/faq/faq_notes/cookies.html"