Re: [jQuery] $.cookie expires problem...Help!
Thanks Klaus for the reply...i did notice the diff cookie name..arg, my fault.Anyway, your cookie plugin helps a lot...Cheers. Regards, cdelfino On 2/22/07, Klaus Hartl <[EMAIL PROTECTED]> wrote: > Clodelio C. Delfino schrieb: > > Hi All, > > > > $.cookie('my_cookie','',{expires: -1}) doesn't seem to work in FF2.0 > > and Opera 9 but working well in IE 6/7 browser. > > > > May I ask how to ensure that "my_cookie" is assured > > deleted/removed...thanks in advance. > > > > Btw, below is a snippet of code. > > $(function() { > > $("#div_logout").click(function() { > > var cuser = $.cookie('my_cookie'); > > var lgout_msg = "Logout user " + cuser + " from the system?"; > > > > if (confirm(lgout_msg)) > > { > > alert(cuser + " was succesfully logged out."); > > > > $.cookie('sjo_cookie','',{expires: -1}); > > > > $(".jqmClose").click(); > > > > location.reload(); > > } > > > > return false; > > }); > > }); > > > > Cheers, > > cdelfino > > Are you sure you are using the correct cookie name when deleting? You > are using two different cookies here ("my_cookie" and "sjo_cookie") but > I cannot see where they are saved in this code... > > -- Klaus > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] $.cookie expires problem...Help!
Ⓙⓐⓚⓔ schrieb: > well it's not my birthday... but I understand that it works... without > going thru how the cookie was made (the plugin) I know that arbitrary > older dates always work. It may be a time zone thing or something else > that is weird! did you ever try -100 days to see if that kills the > cookie? > > > On 2/21/07, Clodelio C. Delfino <[EMAIL PROTECTED]> wrote: >> Thanks Jake for the reply, but below codes works for me now...in both >> ie,ff and opera. >> >> $("#div_logout").click(function() { >> var cuser = $.cookie('my_cookie'); >> var lgout_msg = "Logout user " + cuser + " from the system?"; >> >> if (confirm(lgout_msg)) >> { >> alert(cuser + " was succesfully logged out."); >> >> if ($.browser.msie) >> { >> $.cookie('my_cookie','',{expires: -1}); >> } >> else >> { >> document.cookie = "my_cookie=''; expires=Sun, 01 >> Jan 1970 00:00:01 UTC; path=/" >> } >> >> >> $(".jqmClose").click(); >> >> location.reload(); >> } >> >> return false; >> }); I think it works simply because you changed the cookie name consistently to "my_cookie". There shouldn't be required a branch for IE. The test page works fine in IE. -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] $.cookie expires problem...Help!
Clodelio C. Delfino schrieb: > Hi All, > > $.cookie('my_cookie','',{expires: -1}) doesn't seem to work in FF2.0 > and Opera 9 but working well in IE 6/7 browser. > > May I ask how to ensure that "my_cookie" is assured > deleted/removed...thanks in advance. > > Btw, below is a snippet of code. > $(function() { > $("#div_logout").click(function() { > var cuser = $.cookie('my_cookie'); > var lgout_msg = "Logout user " + cuser + " from the system?"; > > if (confirm(lgout_msg)) > { > alert(cuser + " was succesfully logged out."); > > $.cookie('sjo_cookie','',{expires: -1}); > > $(".jqmClose").click(); > > location.reload(); > } > > return false; > }); > }); > > Cheers, > cdelfino Are you sure you are using the correct cookie name when deleting? You are using two different cookies here ("my_cookie" and "sjo_cookie") but I cannot see where they are saved in this code... -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] $.cookie expires problem...Help!
Nope it doesn't work...using -100 days. On 2/22/07, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote: > well it's not my birthday... but I understand that it works... without > going thru how the cookie was made (the plugin) I know that arbitrary > older dates always work. It may be a time zone thing or something else > that is weird! did you ever try -100 days to see if that kills the > cookie? > > > On 2/21/07, Clodelio C. Delfino <[EMAIL PROTECTED]> wrote: > > Thanks Jake for the reply, but below codes works for me now...in both > > ie,ff and opera. > > > > $("#div_logout").click(function() { > > var cuser = $.cookie('my_cookie'); > > var lgout_msg = "Logout user " + cuser + " from the system?"; > > > > if (confirm(lgout_msg)) > > { > > alert(cuser + " was succesfully logged out."); > > > > if ($.browser.msie) > > { > > $.cookie('my_cookie','',{expires: -1}); > > } > > else > > { > > document.cookie = "my_cookie=''; expires=Sun, 01 > > Jan 1970 00:00:01 UTC; path=/" > > } > > > > > > $(".jqmClose").click(); > > > > location.reload(); > > } > > > > return false; > > }); > > > > On 2/22/07, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote: > > > Cookies get sticky when you alternate www.somewhere.org and > > > somewhere.org, and you haven't specified the domain for the cookies. > > > > > > let's say you set one on somewhere.com then try to clobber it from > > > www.somewhere.com you can get into trouble, > > > > > > this is just general cookie advice. not sure if your cookie has domain > > > problems. > > > > > > On 2/21/07, Clodelio C. Delfino <[EMAIL PROTECTED]> wrote: > > > > Hi All, > > > > > > > > $.cookie('my_cookie','',{expires: -1}) doesn't seem to work in FF2.0 > > > > and Opera 9 but working well in IE 6/7 browser. > > > > > > > > May I ask how to ensure that "my_cookie" is assured > > > > deleted/removed...thanks in advance. > > > > > > > > Btw, below is a snippet of code. > > > > $(function() { > > > > $("#div_logout").click(function() { > > > > var cuser = $.cookie('my_cookie'); > > > > var lgout_msg = "Logout user " + cuser + " from the system?"; > > > > > > > > if (confirm(lgout_msg)) > > > > { > > > > alert(cuser + " was succesfully logged out."); > > > > > > > > $.cookie('sjo_cookie','',{expires: -1}); > > > > > > > > $(".jqmClose").click(); > > > > > > > > location.reload(); > > > > } > > > > > > > > return false; > > > > }); > > > > }); > > > > > > > > Cheers, > > > > cdelfino > > > > > > > > ___ > > > > jQuery mailing list > > > > discuss@jquery.com > > > > http://jquery.com/discuss/ > > > > > > > > > > > > > -- > > > Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ > > > ___ > > > jQuery mailing list > > > discuss@jquery.com > > > http://jquery.com/discuss/ > > > > > ___ > > jQuery mailing list > > discuss@jquery.com > > http://jquery.com/discuss/ > > > > > -- > Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] $.cookie expires problem...Help!
well it's not my birthday... but I understand that it works... without going thru how the cookie was made (the plugin) I know that arbitrary older dates always work. It may be a time zone thing or something else that is weird! did you ever try -100 days to see if that kills the cookie? On 2/21/07, Clodelio C. Delfino <[EMAIL PROTECTED]> wrote: > Thanks Jake for the reply, but below codes works for me now...in both > ie,ff and opera. > > $("#div_logout").click(function() { > var cuser = $.cookie('my_cookie'); > var lgout_msg = "Logout user " + cuser + " from the system?"; > > if (confirm(lgout_msg)) > { > alert(cuser + " was succesfully logged out."); > > if ($.browser.msie) > { > $.cookie('my_cookie','',{expires: -1}); > } > else > { > document.cookie = "my_cookie=''; expires=Sun, 01 > Jan 1970 00:00:01 UTC; path=/" > } > > > $(".jqmClose").click(); > > location.reload(); > } > > return false; > }); > > On 2/22/07, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote: > > Cookies get sticky when you alternate www.somewhere.org and > > somewhere.org, and you haven't specified the domain for the cookies. > > > > let's say you set one on somewhere.com then try to clobber it from > > www.somewhere.com you can get into trouble, > > > > this is just general cookie advice. not sure if your cookie has domain > > problems. > > > > On 2/21/07, Clodelio C. Delfino <[EMAIL PROTECTED]> wrote: > > > Hi All, > > > > > > $.cookie('my_cookie','',{expires: -1}) doesn't seem to work in FF2.0 > > > and Opera 9 but working well in IE 6/7 browser. > > > > > > May I ask how to ensure that "my_cookie" is assured > > > deleted/removed...thanks in advance. > > > > > > Btw, below is a snippet of code. > > > $(function() { > > > $("#div_logout").click(function() { > > > var cuser = $.cookie('my_cookie'); > > > var lgout_msg = "Logout user " + cuser + " from the system?"; > > > > > > if (confirm(lgout_msg)) > > > { > > > alert(cuser + " was succesfully logged out."); > > > > > > $.cookie('sjo_cookie','',{expires: -1}); > > > > > > $(".jqmClose").click(); > > > > > > location.reload(); > > > } > > > > > > return false; > > > }); > > > }); > > > > > > Cheers, > > > cdelfino > > > > > > ___ > > > jQuery mailing list > > > discuss@jquery.com > > > http://jquery.com/discuss/ > > > > > > > > > -- > > Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ > > ___ > > jQuery mailing list > > discuss@jquery.com > > http://jquery.com/discuss/ > > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] $.cookie expires problem...Help!
Thanks Jake for the reply, but below codes works for me now...in both ie,ff and opera. $("#div_logout").click(function() { var cuser = $.cookie('my_cookie'); var lgout_msg = "Logout user " + cuser + " from the system?"; if (confirm(lgout_msg)) { alert(cuser + " was succesfully logged out."); if ($.browser.msie) { $.cookie('my_cookie','',{expires: -1}); } else { document.cookie = "my_cookie=''; expires=Sun, 01 Jan 1970 00:00:01 UTC; path=/" } $(".jqmClose").click(); location.reload(); } return false; }); On 2/22/07, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote: > Cookies get sticky when you alternate www.somewhere.org and > somewhere.org, and you haven't specified the domain for the cookies. > > let's say you set one on somewhere.com then try to clobber it from > www.somewhere.com you can get into trouble, > > this is just general cookie advice. not sure if your cookie has domain > problems. > > On 2/21/07, Clodelio C. Delfino <[EMAIL PROTECTED]> wrote: > > Hi All, > > > > $.cookie('my_cookie','',{expires: -1}) doesn't seem to work in FF2.0 > > and Opera 9 but working well in IE 6/7 browser. > > > > May I ask how to ensure that "my_cookie" is assured > > deleted/removed...thanks in advance. > > > > Btw, below is a snippet of code. > > $(function() { > > $("#div_logout").click(function() { > > var cuser = $.cookie('my_cookie'); > > var lgout_msg = "Logout user " + cuser + " from the system?"; > > > > if (confirm(lgout_msg)) > > { > > alert(cuser + " was succesfully logged out."); > > > > $.cookie('sjo_cookie','',{expires: -1}); > > > > $(".jqmClose").click(); > > > > location.reload(); > > } > > > > return false; > > }); > > }); > > > > Cheers, > > cdelfino > > > > ___ > > jQuery mailing list > > discuss@jquery.com > > http://jquery.com/discuss/ > > > > > -- > Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] $.cookie expires problem...Help!
Cookies get sticky when you alternate www.somewhere.org and somewhere.org, and you haven't specified the domain for the cookies. let's say you set one on somewhere.com then try to clobber it from www.somewhere.com you can get into trouble, this is just general cookie advice. not sure if your cookie has domain problems. On 2/21/07, Clodelio C. Delfino <[EMAIL PROTECTED]> wrote: > Hi All, > > $.cookie('my_cookie','',{expires: -1}) doesn't seem to work in FF2.0 > and Opera 9 but working well in IE 6/7 browser. > > May I ask how to ensure that "my_cookie" is assured > deleted/removed...thanks in advance. > > Btw, below is a snippet of code. > $(function() { > $("#div_logout").click(function() { > var cuser = $.cookie('my_cookie'); > var lgout_msg = "Logout user " + cuser + " from the system?"; > > if (confirm(lgout_msg)) > { > alert(cuser + " was succesfully logged out."); > > $.cookie('sjo_cookie','',{expires: -1}); > > $(".jqmClose").click(); > > location.reload(); > } > > return false; > }); > }); > > Cheers, > cdelfino > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] $.cookie expires problem...Help!
Hi All, $.cookie('my_cookie','',{expires: -1}) doesn't seem to work in FF2.0 and Opera 9 but working well in IE 6/7 browser. May I ask how to ensure that "my_cookie" is assured deleted/removed...thanks in advance. Btw, below is a snippet of code. $(function() { $("#div_logout").click(function() { var cuser = $.cookie('my_cookie'); var lgout_msg = "Logout user " + cuser + " from the system?"; if (confirm(lgout_msg)) { alert(cuser + " was succesfully logged out."); $.cookie('sjo_cookie','',{expires: -1}); $(".jqmClose").click(); location.reload(); } return false; }); }); Cheers, cdelfino ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/