473,395 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

can't find the javascript cookie anywhere

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
4 2215
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ken | last post by:
I am new to PHP. But this seems like a terrific language. I have been using JavaScript up to now but it looks like I will be changing to PHP. Seems to have more potential. I am confused about...
7
by: N.K | last post by:
Hi , Python's existing cookie module doesnt supports new cookie headers SetCookie2 , How to submit a patch for that ? I tried emailing person who owns that module.But no response. Thanks,...
2
by: Michael | last post by:
I am reading and setting a cookie using JavaScript in the BODY onload and onunload events respectively. This works fine. However when I use ASP to set the cookie under some condition where I...
1
by: duane | last post by:
Dear Experts: I have a problem with my JS cookies. I am setting cookies in files located in two different directories, e.g. one in ROOT, one in ROOT/dir1/dir2. The cookies are then sent to PHP...
3
by: HorseGeek | last post by:
I can't find a cookie that my code is writing. The behavior of my webpages indicates that the cookie IS being written SOMEPLACE. However, I can't find it. My client does not want the code going...
1
by: Mike | last post by:
Hello, I can't find any javascript that reads and writes cookies with keys, so that it is compatible with ASP (I want to read and write cookies from both javascript and ASP) for example in...
3
by: Wysiwyg | last post by:
After a server created cookie is processed on the client I want it removed, cleared, or expired in the javascript block but have been unable to do this. If I set a cookie value in the server code...
0
by: JT | last post by:
I posted a question earlier about communicating between a javascript function and vb.net. In the end I decided to try using a cookie. I use the following javascript function (from vb.net) to set...
24
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How can I see in javascript if a web browser accepts cookies?...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.