Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cookies in Netscape

Status
Not open for further replies.

meself

MIS
Jan 16, 2003
3
0
0
CA
Hi, everyone!
I have a problem writing cookies through Netscape, though there's no problem in IE.
Could you, please, take a look at the code and tell me what's wrong with it.Or,maybe, I should change something in browser's settings?
Thank you.
------------------------------------
<script language=&quot;javascript&quot;>
function setCookies(){
var expDate = new Date();
expDate.setTime(expDate.getTime()+ 1000*60*60*24*365);
if (document.form1.set.checked)
{
document.cookie = &quot;show=yes;expires=&quot; + expDate.toGMTString();
}
}
</script>

Function setCookies() is called as follows: <body [red]onUnload[/red]=&quot;setCookies();&quot;>
 
the problem with netscape is that it access different elements in the Document than IE does...as you said the code does work fine in IE because that is how IE calls objects from the document but netscape does it differently...go to the W3C site @ oe visit I think there are some tutorials on the netscape dom...
 
if that doesn't help try posting that message in the JavaScript forum...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top