I wanna set a cookie with jQuery, I went through some Qestions with similar title in stackoverflow, but they didnt solved the problem
here is my code
$(document).ready(function() {
alert("Test");
$.cookie('iwiNews', 'login', { path: '/', expires: 1 });
alert( $.cookie("iwiNews") );
});
I also tried
$(document).ready(function() {
alert("Test");
$.cookie('iwiNews', 'login');
alert( $.cookie("iwiNews") );
});
and
开发者_开发问答 $(document).ready(function() {
alert("Test");
$.cookie('iwiNews', 'login' {expires: 1 });
alert( $.cookie("iwiNews") );
});
The alert "Test" is to check if the actionhandler works, the alert wich returns the cookie value doesnt fire at all. The coodie isnt set if I look up the cookie list in Firefox. Somebody has an Idea why? thanks a lot in advance, daniel
精彩评论