[Pro] Too Cookie or Not to Cookie, THAT is the Question

On my top page, within the DOM Loaded Observer button of Protaculous 2, I am using the following code:

var message_box = $('legaleze').setStyle('z-index: 1000');
$$('body').first().insert(message_box.remove());
var jar = new CookieJar({expires: ''});
//you can also set expires to any number of seconds
if(!jar.get('hide_message')){
  message_box.show().observe(
    'click',
    function(evt){
      jar.put('hide_message',true);
      this.hide();
    }
  );
};

I tried using the same code on my new page, but again, if I go to my top page FIRST and then to my new page, the popover content of my top page displays, but the popover content of my new page won’t display. And like I said before, if I relaunch the browser and go directly to my new page, it’s popover content displays fine. And if I then go to my top page, it’s popover content displays fine. Why in the world is it that when I go to my top page FIRST, then my new page won’t display it’s popover content?

I tried changing the var name but that didn’t do anything. I tried changing CookieJar to CookieJar2, but that didn’t do anything. I renamed my popover content from “legaleze” to “ttt” and then updated the code accordingly, but that didn’t fix the problem either.

Again, I want independent control over the popover content on my TOP page and my NEW page. It shouldn’t matter which page I display first. Whatever page I choose should show its popover content ONCE PER SESSION, which usually means I need to relaunch the browser to see it display again. Displaying one page’s popover content should never prevent another page’s popover content from displaying.

Your thoughts?

–James W.


freewaytalk mailing list
email@hidden
Update your subscriptions at: