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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can not set a cookie !

Status
Not open for further replies.

Sjobba

Programmer
Sep 29, 1999
7
SE
This problem is so strange I have to examine my head.<br>
<br>
This function sets the cookie !<br>
<br>
function SetCookie(sName, sValue)<br>
{<br>
var expires = new Date(3E13);<br>
alert(); //completely empty alert box !<br>
document.cookie = sName + &quot;=&quot; + escape(sValue)+&quot;; expires=&quot;+expires+&quot;;&quot;;<br>
}<br>
<br>
This function does NOT set the cookie !!!!???!<br>
function SetCookie(sName, sValue)<br>
{<br>
var expires = new Date(3E13);<br>
document.cookie = sName + &quot;=&quot; + escape(sValue)+&quot;; expires=&quot;+expires+&quot;;&quot;;<br>
}<br>
<br>
The function is called by this:<br>
&lt;input type=&quot;button&quot; value=&quot;SetCookie&quot; onclick=&quot;SetCookie('Version','2')&quot;&gt;<br>
<br>
Please help me I'm going kaka here !<br>
<p>Anders Sjöberg<br><a href=mailto:ansj@perceptive.se>ansj@perceptive.se</a><br><a href= webpages</a><br>
 
Funny. They both work for me. <p>nick bulka<br><a href=mailto:nick@bulka.com>nick@bulka.com</a><br><a href= > </a><br>
 
What browser are you using? version?<br>
<br>
Earlier versions of IE had a somewhat flawed implementation of cookies. They supported cookies, and all methods, but you can not test them on your own computer.<br>
<br>
I dont remember what versions it is, but maybee you should upgrade your browser. <p>theEclipse<br><a href=mailto: > </a><br><a href=robacarp.webjump.com>robacarp.webjump.com</a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top