...

View Full Version : Problem with cookies...



masterjguscius
01-26-2009, 09:37 PM
Hey everyone,
I use non-ascii cookie names trough PHP (for example: sausainėlis[forumiečio_slapta˛odis]) and js can't read those. I've tried document.cookie and browser gave me this name:
sausainėlis1[forumieĨio_slaptažodis]

Please help me to get value of this damn cookie...

function get_cookie(cookie_name) {
var results = document.cookie.match ( '(^|;) ?' + cookie_name + '=([^;]*)(;|$)' );
if ( results ) return ( unescape ( results[2] ) );
else return null;
}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum