Networking | Hardware | Software | Multimedia | System | Unix&Linux | MBA

Home>>Hardware>>Problem with document.ignore in javascript

Problem with 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

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"


 

TOP

Hyperthreading hurts s
HP sharpens blade PC l
Apple goes for Quad po
Itanium gets scaled do

For more info

HP sharpens blade PC l
Hyperthreading hurts s
can not call click() i
script does not work o
smart menu 
write to an html file 
FireFox doesn't recogn
Changing e.keyCode (e.
Clearing a range creat
UPDATE: My mouse over 

News Archive

onChange Help 
beforeload? vs onload.
Problem with document.
decreasing my javascri
Problem with \\ and \ 
how to stop scrolling?
Change Label Text Colo
Can I forward a page b
2 javascript functions
Validating a textbox 

Related stories:

onChange Help
beforeload? vs onload.
decreasing my javascript
Problem with \\ and \
how to stop scrolling?
Change Label Text Color and Its Shade of Disabled Buttons
Can I forward a page by the URL used to get to it?
2 javascript functions clashing...
Validating a textbox

Copyright@2004-2005 www.zzcoke.com All Right Reserved

advanced web statistics