'; $('#flash_from_js_26096').after(data); // Optional: jQueryUI effects if(msg.search(/denied/i) > -1) { $('#'+key+'.flash-message-26096').delay(5000).fadeOut(); } if(key == 'flash_error_fixed_to_top') { window.setTimeout(function() { $('#'+key).fadeOut(3000); }, 10000); } // Now delete them. (this was set from AccessComponent::setFlash()) $.removeCookie('elstats_flash_message',{domain:'.electionstats.state.ma.us',path:'/'}); $.removeCookie('elstats_flash_key',{domain:'.electionstats.state.ma.us',path:'/'}); // Not working (from Cake Cookie component) //$.removeCookie('CakeCookie[Flash][message]',{domain:'.electionstats.state.ma.us',path:'/'}); //$.removeCookie('CakeCookie[Flash][key]',{domain:'.electionstats.state.ma.us',path:'/'}); //console.log('after flash:'); //console.log(document.cookie); } /** $.post('/flash_from_js/',{},function(data) { if(data) { $('#flash_from_ajax_26096').after(data); } }); **/