blackman890 — 2010-07-19T13:02:58-04:00 — #1
Here's the relevant code:
var expires = "";
var date = new Date();
expires = "; expires="+date.toGMTString();
expires = "";
document.cookie = name+"="+value+expires+"; path=/";
Full code: http://kisildalur.is/web/scripts/cart.js
You can see it live if you go to http://kisildalur.is/?p=1&id=7 click on "Kaupa" (Icelandic for Buy) on any item. You will see a nice simple animation once you do. Once an item has been added, a cookie is created but in my Opera 10.53 the cookie does not exist. Browsing any other pages will result in the cart being empty.
What am I doing wrong? :S Works for every other major browser except Opera.
blackman890 — 2010-07-20T14:39:39-04:00 — #2
I could have sworn I had tested it too but it turns out you were right, I had to run it though escape() in order for it to work on Opera.
Thanks for all the help This issue has been solved.
autisticcuckoo — 2010-07-20T01:58:06-04:00 — #3
Do you get an error message in the error console?
One thing that has tripped me up when dealing with cookies has been when the value contains non-ASCII characters. Maybe you can try to use
blackman890 — 2010-07-19T18:21:04-04:00 — #4
felgall — 2010-07-19T15:17:45-04:00 — #5
Sounds like you have set Opera to not allow cookies.
Go to Tools/Preferences/Advanced and check what options you have set for Cookies.