August 5th, 2002, 02:20 PM
- How do you set a cookie in javascipt? Is there an aquivalent of the php function setcookie() ?
Finaly, if someone know a good, complete tutorial on cookies with JS, please tell me!
August 6th, 2002, 11:50 AM
document.cookie = "cookiename=cookievalue"
var cookieVal = document.cookie.substring(document.cookie.indexOf("cookiename") + 11, document.cookie.length)
Yup, it's crap, so you're better off using PHP/ASP to extract the cookie info.