I have a web aplication where I'm working with cookies. The problem is that in a form "A", I save the cookies with the following code in Javascript.
function uploadCookieMesa(dataCookie) {
saveCookie('qr_rest_c_icod', dataCookie.rest_c_icod);
saveCookie('qr_rest_c_vnomb', dataCookie.rest_c_vnomb);
saveCookie('qr_loca_c_icod', dataCookie.loca_c_icod);
saveCookie('qr_loca_c_vnomb', dataCookie.loca_c_vnomb);
saveCookie('qr_mesa_c_icod', dataCookie.mesa_c_icod);
saveCookie('qr_mesa_cli_c_icod', dataCookie.mesa_cli_c_icod);
saveCookie('qr_clie_c_icod', dataCookie.clie_c_icod);
saveCookie('qr_mesa_cli_c_vcomentario', dataCookie.mesa_cli_c_vcomentario);
}
function saveCookie(name,value) {
var expiresdate = new Date(2068, 1, 02, 11, 20);
document.cookie = name + "=" + encodeURIComponent(value) + "; expires=" + expiresdate.toUTCString();
}
In this form, I could save the values but when I enter another form "B". This cookies are cleaning.
I need you help. Thanks!!!
Aucun commentaire:
Enregistrer un commentaire