problem with Cookies

Results 1 to 3 of 3

Thread: problem with Cookies

  1. #1
    Richard Collins Guest

    Default problem with Cookies

    Hello,<BR>I have created a cookie by the code below:<BR>Response.Cookies("req")("Casecode") = "all"<BR><BR><BR>My HTML document has a dropdown list of Casecodes and a button:<BR>&#060;input type=button value=Show Name=btnShow&#062;<BR><BR><BR>I have some VB Script which is intended to set the cookie to the value selected by the user from the dropdown (but which is currently hardcoded), then re-retrieves the page showing only the details of the selected Casecode:<BR>&#060;script Language="VBScript" RUNAT="SERVER"&#062;<BR>sub btnShow_onclick<BR> Response.Cookies("req")("Casecode") = "010308"<BR> Response.Redirect "./requirements.asp"<BR>end sub<BR>&#060;/script&#062;<BR><BR>The script doesn&#039;t seem to be executing and I have no idea why.<BR>Does anyone have any ideas?<BR>Thanks.

  2. #2
    Join Date
    Dec 1969

    Default RE: problem with Cookies

    You seem to be doing a simple task a complicated way. Be aware that for some reason many websurfers mistakenly regard cookies as evil and disable them, in which case your code won&#039;t work anyway.<BR><BR>Why not just have the button submit a form containing the dropdown list, and then the page that you submit to could do a Request.Form to get the Casecode, and display the relevant information?

  3. #3
    Richard Collins Guest

    Default RE: problem with Cookies

    Well, I have simplified the problem a bit. In reality I&#039;m drilling into some data to two or three levels and providing links to navigate back out again. I have to give the lower level pages the parameters required to get back to the top level page and I don&#039;t want a huge set of arguments after the ? in the address bar.

Posting Permissions

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