By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,584 Members | 1,065 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,584 IT Pros & Developers. It's quick & easy.

can't find the javascript cookie anywhere

P: n/a
I'm writing a js cookie from an asp.net page. A .NET cookie won't do.
Inside the js func. that writes the cookie, I do this code to see the cookie
afterwards:

window.document.write(document.cookie);

That shows me this on the asp.net page:
machinename=jshohet; ASP.NET_SessionID=adt2......

So I know the cookie is being written. Otherwise i wouldn't see the name I
gave it (machinename) and the value (jshohet). Prob is, I'm looking in
documents & settings for the logged in user & i don't see a cookie in it,
except for some yahoo cookie ;)

TY for any help J. Shohet
Nov 18 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
If you don't have an expiration date, this is a temporary cookie (ie. the
cookie is cleared when IE closes ; technically it is likely in memory rather
than being persisted to a file).

Patrice

"Jason Shohet" <__******@yahoo.com> a écrit dans le message de
news:%2****************@tk2msftngp13.phx.gbl...
I'm writing a js cookie from an asp.net page. A .NET cookie won't do.
Inside the js func. that writes the cookie, I do this code to see the cookie afterwards:

window.document.write(document.cookie);

That shows me this on the asp.net page:
machinename=jshohet; ASP.NET_SessionID=adt2......

So I know the cookie is being written. Otherwise i wouldn't see the name I gave it (machinename) and the value (jshohet). Prob is, I'm looking in
documents & settings for the logged in user & i don't see a cookie in it,
except for some yahoo cookie ;)

TY for any help J. Shohet

Nov 18 '05 #2

P: n/a
hi Patrice
Without closing the browser, I go to documents & settings, & I dont' see the
cookie. I see others there, but not the one I just wrote. Its just not
there. I'm using IE 6 on XP. I've tried it with setting expiration &
without, and the cookie is never there, even though the browser is still
open.
I'm writing a js cookie from an asp.net page. A .NET cookie won't do.
Inside the js func. that writes the cookie, I do this code to see the cookie
afterwards:

window.document.write(document.cookie);

That shows me this on the asp.net page:
machinename=jshohet; ASP.NET_SessionID=adt2......

So I know the cookie is being written. Otherwise i wouldn't see the name I
gave it (machinename) and the value (jshohet). Prob is, I'm looking in
documents & settings for the logged in user & i don't see a cookie in

it, except for some yahoo cookie ;)

TY for any help J. Shohet


Nov 18 '05 #3

P: n/a
could it be that .NET's index.dat file is taking over for the javascript,
and somehow stuffing my cookie in there :(
I do see index.dat's date in the documents & settings for the logged in
user, updated to the time i set the cookie, but could just be coincidence.
Nov 18 '05 #4

P: n/a
its not in the index.dat, i'm sure of that. But the js cookie is not being
written it seems. Here's my js func.

<script language="javascript">
function setCookie(name, value, expires, path, domain, secure)
{
document.cookie= name + "=" + escape(value) +
((expires) ? "; expires=Mon, 27-Apr-2005 00:00:00 GMT) +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
((secure) ? "; secure" : ""); */

window.document.write(document.cookie);
}
</script>

And I'm calling it from the onkeyup of an asp.NET textbox:
onkeyup="setCookie('machinename', 'shohet', '', '', '', '')"
Nov 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.