Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > can't find the javascript cookie anywhere

Reply
Thread Tools

can't find the javascript cookie anywhere

 
 
Jason Shohet
Guest
Posts: n/a
 
      05-11-2004
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


 
Reply With Quote
 
 
 
 
Patrice
Guest
Posts: n/a
 
      05-11-2004
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" <(E-Mail Removed)> a écrit dans le message de
news:%(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
 
Jason Shohet
Guest
Posts: n/a
 
      05-11-2004
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
> >
> >

>
>



 
Reply With Quote
 
Jason Shohet
Guest
Posts: n/a
 
      05-11-2004
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.


 
Reply With Quote
 
Jason Shohet
Guest
Posts: n/a
 
      05-11-2004
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', '', '', '', '')"


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I change a Label? Please Help. I can't find this anywhere. Shapper ASP .Net 1 05-06-2005 03:20 PM
3620, rommon, and xmodeming an ios to it .. cannot find help for this anywhere. Volatileacid Cisco 1 07-30-2004 04:03 AM
Can't find cookie in cookie directory ... where could it be? HorseGeek Javascript 2 04-05-2004 07:55 PM
Retrieving cookie data through document.cookie (Javascript) Vikram Bhatia Javascript 1 10-11-2003 12:54 PM
Does this existing anywhere in the world? (javascript download progress meter) Julia Briggs HTML 2 06-27-2003 06:49 AM



Advertisments