[jQuery] passing cookies in drupal modules
I'm using jquery.cookie.js with Drupal 5.5, and am trying to pass a
value between some jquery code etween a module I wrote and the rest of
the site. I found I could set the cookie in my module, and it would be
set correctly the next time I entered the module. But from rest of the
site, I don't see the cookie. If I do a dump of my current cookie
values when I enter the module, I'm seeing:
has_js 1
SESSee9fee6bd0ea8e89bb7b0189ed70ef07
8b8df443d802524079d04a7d391dd278
collapsiblock-block-menu-87 0
collapsiblock-block-menu-97 0
collapsiblock-block-user-1 0
and also see it when I dump cookies in template.php. In my module,
where I set the cookie, I'm seeing the new value correctly, but I
don't see it in the dump from template.php. So I started looking at
options; both modules are in the same domain, so I tried setting the
path to the root:
$.cookie('mycookie', new_value, {path: '/'});
It still isn't working. Is there something else I need to do, or is
there just no way to pass data with cookies in Drupal?