Results 1 to 2 of 2

Thread: Cookies-Urgent!!!

  1. #1
    Ashy Guest

    Default Cookies-Urgent!!!

    Can anyone see why this does not work when I know that I have a variable stored in the cookie. <BR><BR>variable=request.cookies("Logged")<BR>resp onse.write variable %&#062;<BR>&#060;FONT COLOR=WHITE face="verdana,arial" size=2&#062;&#060;%= variable %&#062;<BR><BR>Also if I try to set more than one variable the cookie is empty.<BR>E.g<BR><BR>This works:<BR>if p_save = "yes" then<BR> Response.cookies("Logged")=p_username<BR> Response.cookies("Logged").expires="May 20, 2010"<BR>end if<BR><BR>This will not work:<BR><BR>if p_save = "yes" then<BR> Response.cookies("Logged")("username")=p_username< BR> Response.cookies("Logged").expires="May 20, 2010"<BR>end if<BR><BR>Either way the request cookies does not work.<BR><BR><BR>

  2. #2
    Joel M Guest

    Default RE: Cookies-Urgent!!!

    Truthfully...I can&#039t really see the error...but here&#039s a snippet of code that I know works because I just copy/pasted from one of my working sites:<BR>----------------------------<BR>response.cookies ("agent") ("name") = mvarName &#039maybe the spaces between the fields?<BR>response.cookies ("login") = "true"<BR>----------------------------<BR><BR>one thing that you could try is adding a string value, instead of a variable...and then testing it when you load up the page by typing this into the browser URL bar:<BR><BR> javascript:alert(document.cookie)<BR><BR>that will show you the exact contents of every cookie that your site has set...<BR><BR>hope it helps<BR><BR>Joel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts