Detecting Client's scripting support

A

Austin Rathe

Dear All,

I need to be able to detect, server side, if the client machine using my
ASP.NET web app supports Javascript. I know there are browser object
properties that tell me if the client browser *in principle* supports
javascript, but as far as I can tell they don't tell you if the user has
disabled scripting manually.

I have seen sites using PHP that can do this, but I can't see how to do
it in .NET. Any ideas?

All help much appreciated.

Austin Rathe
 
K

Kevin Spencer

If the client is NOT supporting JavaScript, you're in big trouble! ASP.Net
relies HEAVILY on JavaScript for its programming model. It might be better
for you to use ASP if that is a consideration.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 
B

bruce barker

you do a sniffer page

<meta HTTP-EQUIV="Refresh" CONTENT="1; URL=sniffer.aspx?jtest=0">
<form name=test action="sniffer.aspx" method="get">
<input type=hidden name="jtest" value="0">
</form>
<script>document.test,jtest.value="1";document.test.submit();</script>


on the the refresh, test if jtest is 1 or 0

-- bruce (sqlwork.com)
 
A

Austin Rathe

you do a sniffer page

Good tip, thanks!

Regarding ASP>NET's use of script, its actually pretty easy to make
pages not use scripts client side, provided that you don't use
linkbutton controls or client side validation, everything else more or
less works.

Thanks for your help everyone.

Austin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top