how do i set a cookie with javascript? this is what i have: var cookie_date = new Date ( ); document.cookie = "clickcookie=clicked; expires=" + cookie_date.toGMTString(); Code (markup): this doesnt seem to work. what am i doing wrong? i want to set a cookie called "clickcookie"...and i want it to expire in 30 days