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

I changed the code on my NEW page to the following:

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

I changed “hide_message” to become “hide_msg2”. That improved the situation in that, regardless of entry point, I see popover content on my TOP page and my NEW page. HOWEVER, if I open my NEW page then the HOME page and then return to the NEW page, the popover content on my NEW page displays twice. It’s only twice and no more (per session), but its strange. Why twice?

Observing the browser cookies, I see that 2 cookies named “__CJ_hide_msg2” are being created (for my NEW page). But why?

I want to display the popover content ONCE and only ONCE per page, per session.

Thanks,

James W.


freewaytalk mailing list
email@hidden
Update your subscriptions at: