why doesn't this work?

Results 1 to 2 of 2

Thread: why doesn't this work?

  1. #1
    Join Date
    Dec 1969

    Default why doesn't this work?

    I found this example of code in the FAQ&#039;s. I simply want to check if the user has cookies set on their browser. I tried this code exactly as is and strcookies is ALWAYS TRUE (I displayed value via response.write), no matter if I turn cookies on or off on the browser (IE 4.0). Is there something missing that anyone can see in the code?<BR><BR>I would also like to check if javascript is enabled, and it seems the same code below should work but checking <BR><BR> strjava = objbrowser.javascript<BR> if strjava = "True" then, etc......<BR><BR>should work OK. Any ideas??? Thank You.<BR> <BR><BR><BR>&#060;%<BR>dim objbrowser<BR>on error resume next<BR>set objbrowser = server.createobject("MSWC.BrowserType")<BR>if isobject(objbrowser) then<BR> strcookies = objbrowser.cookies<BR> if strcookies = "True" then<BR> .....<BR> browser able to use cookies cookie code goes here<BR> .....<BR> else<BR> .....<BR> browser has no cookies, nocookie code goes here<BR> end if<BR>else<BR> response.write ("Error creating the object")<BR>end if<BR>%&#062;<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: why doesn't this work?

    .cookies shows if the browser is capable of displaying, not whether they&#039;re switched on or off. same with .javascript<BR><BR>Browscap means browser *capabilities* not browser *settings*<BR><BR>j

Posting Permissions

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