-
Well, you can check if Coockies are enabled with the same method you used the JavaScript ... try to write a coockie and try to read from it, if it worked ---> coockies enabled if not then no.
I don't know of any way to check if JavaScript is enabled or not.
You have to remember ASP is server side, so it has its limitations as far as information about the user..
-
I thought it wouldnt be possiable to check for javascript,i need to verify it because all the validations are done on the client side. thought it would save resources and be more effiecent. thanks for the help.
Scott
-
Welcome, sorry for not being able to help more ...
You can do all the checks using ASP ..
if you think it is a good idea but not sure how, just say so, I will post you example code.
-
If you have code to check for javascript and cookies then by all means please post it.
Thanks
-
I did some research for you ...
this will get you ALL the things you need :
http://www.cyscape.com/developer/wor...hcd2=968693273
example for all the information you can get (including JavaScript !!!):
http://www.cyscape.com/showbrow.asp
cheers :-)
-
Well, I just read some more about it ...
It is NOT the cheapest way .. :-(
I was trying to make a cookies test, but from some reason I always get the same results ...
maybe someone else can help us sort it out ..
<%
dim theUID
response.cookies ("Test") = "12345"
%>
<html>
<head>
<title>cookcies</title>
</head>
<body>
<%
theUID=""
theUID=request.cookies ("Test")
if theUID<>"12345" then
response.write "cookies disabled"
else
response.write "Cookies enabled"
end if
%>
</body>
</html>
from some reason I get the Coockie enabled everytime (even if I have cookies disabled ..
Help !
-
Well with ASP you can check ServerVariables to see what kind of browser is contacting you and based on this information you can know if the browser is Javascript capable, I belive the proper command to figure this out is:
Code:
Request.ServerVariables("HTTP_USER_AGENT")
using this can also be a way to check to see if VBScript is capable by seeing if "MSIE" exist in the returned string. you cannot however determine if a certain feature is enabled or disabled just based on ServerVariables, it may be a good idea to warn the user ahead of time, and to also include
<Script language="javascript">
<!--
It's a good idea to use Comment blocks within script, any script capable browser, will ignore the comment, and process the script, any non-capable browser will ignore the script tags, but will also not show your code on the website because they're enclosed in <!-- -->
-->
</Script>
-
Well,
The thing is that the guy would like to know not only if the browser is capable, but also if it is ENABLED ...
-
um asabi, were you not listening, I already mentioned concerns about if it's enabled or not, I didnt ignore that question now stop acting like we dont know what questions we're addressing.
"you cannot however determine if a certain feature is enabled or disabled just based on ServerVariables, it may be a good idea to warn the user ahead of time...."
-
Hey guys, thanks alot for all the code and the suggestions. I previously saw browserhawk but didnt really use all its capablities. Maybe ill consider getting it if it can detect javascript, cookies, browser type etc. In the mean time, i guess i can continue to use my method of cookies and javascript checking. Send a cookies using javascript and it it works boom javascript is enabled. Quick and dirty method.