I need help with the script below.
If the cookie is set, a message should say so. If not, a message will say so and then set the cookie and it's value.
for some reason this does NOT work:
Code:<% Option Explicit Response.Buffer = true Dim expDate, aspPoll aspPoll = "aspPoll" expDate = "2001-05-09 21:42" ' for this version this is static, it will be dynamic in the near future Response.write("------------------------<BR>") Response.write("ExpireDate: "& expDate &"<BR>") Response.write("TodayDate: "& now) Response.write("<BR>------------------------<BR><BR>") Response.write(Request.Cookies(aspPoll) &"<BR><BR><BR><BR><BR><BR>") IF (Request.Cookies(aspPoll) <> "") THEN Response.write("the cookie is set and running!<BR>"&_ "Cookie Value: "& Request.Cookies(aspPoll)) ELSEIF (Request.Cookies(aspPoll)="") THEN Response.write("This cookie is not set yet...<BR>") Response.write("<B> Creating cookie....</B><BR>") Response.Cookies(aspPoll).Expires = CDate(expDate) Response.Cookies(aspPoll).Domain = ".Caffeine" Response.Cookies(aspPoll).Path = "/" Response.Cookies(aspPoll) = "someText" Response.write("reload the page and this cookie will be set!!!<BR>") Response.write("Cookie value: "& Request.Cookies(aspPoll) &"<BR><BR>") ELSE Response.write("some other text here...") END IF %> <HTML> <HEAD> <TITLE>Untitled</TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF"> </BODY> </HTML>
I really appreciate any help since this is the last thing missing in my poll-system.
thanks,
David




Reply With Quote