Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checking for cookies
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00816484
Message ID:
00817480
Views:
17
Wesley,
I'm brand new to JavaScript and almost brand new to cookies.
I thought I had things figured out but I'm still making a mistake somewhere.
Would it be possible for you to send me a sample of a page with a JavaScript cookie check?
All it would need to do is
Check to see if Cookies are accepted using JavaScript Code
IF Cookies are enabled THEN
Write a cookie to the user machine
display the text "Cookies Enabled"
ELSE
display the text "Cookies NOT Enabled"
END IF

I really appreciate the help!
Thank you.

--------------------------
>>I think I figured out how to make it work as I expected it to...
>>I had the code to create the cookie and the code to read the cookie, on the same page. I now have the code that creates the cookie on page 1 and the code that reads the cookie on page 2.
>
>
>You can have the code to read and write the cookie on the same page.
>Logical example:
>
>  IF cookie exits on the user machine THEN
>      Read the Cookie
>  ELSE
>      Check to see if Cookies are accepted using JavaScript Code
>      IF Cookies are enabled THEN
>           Write the cookie to the user machine
>      END IF
>  END IF
>
>
>>But I still don't know why it "seemed" to work when I had both
>>Cookies: Allow cookies that are stored on your computer
>>and
>>Cookies: Allow per-session cookies (not stored)
>>set to disable....in all zones.
>>
>>would that still correspond to the Browser Session Cookie you mentioned?
>
>   Were your cookie setting set to "Overide automatic cookie handling?"
>
>>
>>
>>I've decided that I need to probably use JavaScript to do the test for the cookies...
>>If I do would I then be able to test on just one page?
>
>   Yes
>
>
>
>
>>--------------------------------
>>>:: Even tho I've disabled cookies (and this is confirmed by visiting sites that require cookies, such as UT), somehow my code is behaving as if cookies are enabled and my code writes to the cookies and retrieves data back from the cookies...however I can't find any evidence of the cookie on my workstation or server.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform