473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Detecting Client's scripting support

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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #1
3 1359
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

"Austin Rathe" <au****@gametart.com> wrote in message
news:O#*************@TK2MSFTNGP10.phx.gbl...
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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #2
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.tes t.submit();</script>
on the the refresh, test if jtest is 1 or 0

-- bruce (sqlwork.com)
"Austin Rathe" <au****@gametart.com> wrote in message
news:O%***************@TK2MSFTNGP10.phx.gbl...
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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #3
> 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


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Shagshag | last post by:
hello, does anyone know of a full python + wxWindows email client ? google didn't help me... thanks,
2
by: popov | last post by:
I try with no luck to use python in a simple html page: <html> <body> <script language="Python"> window.alert('test') window.document.write('test') </script> </body> </html>
6
by: Astra | last post by:
Hi All I have a Javascript to detect whether a client's browser has flash installed, but as so many people are putting me off relying on Javascript, could you please let me know if you know how...
25
by: Ryan Stewart | last post by:
I'm working on a project to collect web application usage statistics. What are the recommended ways of detecting whether a browser is JavaScript enabled and/or capable? Obviously I can write a...
3
by: raptor | last post by:
hi, how to detect opera..it seems that even opera8 doesnt support xmlhttp fully (.i.e. sendRequestHeader). I ask this 'cause opera seems to mimic IE, at least in the preferences ?! I havent...
11
by: Dag Sunde | last post by:
We have this web-app that requires Javascript to be enabled in the UA (this is okay'ed by our customer). Now I want to make a "pre" page before the login screen, informing the user that he/she...
1
by: Chris | last post by:
Hi, I have jsut started to learn ASP development and have read many articles regarding which is the best to use regarding JavaScript or VBScript. All of the learning that I have done so far has...
35
by: Dan Rumney | last post by:
Hi all, I've been writing Javascript for quite a while now and have, of late, been writing quite a lot of AJAX and AJAX-related code. In the main, my dynamically generated pages are created...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.