...

View Full Version : Setting simple Cookie



RealBeginner
07-24-2002, 08:15 PM
Hi All,

I am trying to set a simple cookie when a page loads. I am a beginner and all the cookie scripts I have look at are too complicated for what I want.

I tried

onLoad="document.cookie = 'CookieName','Value' " but this does not work.

I want the cookie to last while the user is on the site and once he leaves it must be deleted.

Am I on the correct path and can anyone help?

Thanks in advance.

boywonder
07-24-2002, 11:43 PM
try:

onLoad="document.cookie='name=value'"



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum