473,394 Members | 1,893 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,394 software developers and data experts.

Scripting disabled

Is there any way, from ASP, ASP.Net or client-side scripting, to determine
whether the browser has client-scripting disabled?

Thanks
Kev
Jun 27 '06 #1
7 1599
Mantorok wrote:
Is there any way, from ASP, ASP.Net or client-side scripting, to determine
whether the browser has client-scripting disabled?

Thanks
Kev


Check the below pasted MSDN code excerpt for finding whether browser
supports JS or not

using System;
using System.Web.UI;
using System.Web.UI.Adapters;

public class CustomControlAdapter : ControlAdapter
{
protected override void Render( HtmlTextWriter writer )
{
// Access Browser details through the Browser property.
Version jScriptVersion = Browser.JScriptVersion;

// Test if the browser supports Javascript.
if (jScriptVersion != null)
{
// Render JavaScript-aware markup.
}
else
{
// Render scriptless markup.
}
}
}

There is one more way to do this, check this article
(http://www.15seconds.com/issue/030303.htm) which works in .NET 1.1 as well.

Let me know if you need any further clarifications.

-
Vadivel Kumar
http://vadivelk.net
Jun 27 '06 #2
Thanks very much - any way of doing it in classic-asp? Just out of interest.

Kev

"Vadivel Kumar" <va******@vadivelk.net> wrote in message
news:ul**************@TK2MSFTNGP03.phx.gbl...
Mantorok wrote:
Is there any way, from ASP, ASP.Net or client-side scripting, to
determine whether the browser has client-scripting disabled?

Thanks
Kev


Check the below pasted MSDN code excerpt for finding whether browser
supports JS or not

using System;
using System.Web.UI;
using System.Web.UI.Adapters;

public class CustomControlAdapter : ControlAdapter
{
protected override void Render( HtmlTextWriter writer )
{
// Access Browser details through the Browser property.
Version jScriptVersion = Browser.JScriptVersion;

// Test if the browser supports Javascript.
if (jScriptVersion != null)
{
// Render JavaScript-aware markup.
}
else
{
// Render scriptless markup.
}
}
}

There is one more way to do this, check this article
(http://www.15seconds.com/issue/030303.htm) which works in .NET 1.1 as
well.

Let me know if you need any further clarifications.

-
Vadivel Kumar
http://vadivelk.net

Jun 27 '06 #3
Mantorok wrote:
Thanks very much - any way of doing it in classic-asp? Just out of interest.

Kev

"Vadivel Kumar" <va******@vadivelk.net> wrote in message
news:ul**************@TK2MSFTNGP03.phx.gbl...
Mantorok wrote:
Is there any way, from ASP, ASP.Net or client-side scripting, to
determine whether the browser has client-scripting disabled?

Thanks
Kev

Check the below pasted MSDN code excerpt for finding whether browser
supports JS or not

using System;
using System.Web.UI;
using System.Web.UI.Adapters;

public class CustomControlAdapter : ControlAdapter
{
protected override void Render( HtmlTextWriter writer )
{
// Access Browser details through the Browser property.
Version jScriptVersion = Browser.JScriptVersion;

// Test if the browser supports Javascript.
if (jScriptVersion != null)
{
// Render JavaScript-aware markup.
}
else
{
// Render scriptless markup.
}
}
}

There is one more way to do this, check this article
(http://www.15seconds.com/issue/030303.htm) which works in .NET 1.1 as
well.

Let me know if you need any further clarifications.

-
Vadivel Kumar
http://vadivelk.net


I think, it is possible thru make a server-call inside <NOSCRIPT> tag
as similar like below,

<NOSCRIPT>
<%
// Make a server call and log that client doesn't have JS support
%>
<NOSCRIPT>

I am not sure about this way, since I've not tested. This is just a thought.

-
Vadivel Kumar
http://vadivelk.net
Jun 27 '06 #4
Ok thanks, we'll go with the ASP.net solution.

Kev

"Vadivel Kumar" <va******@vadivelk.net> wrote in message
news:O2**************@TK2MSFTNGP03.phx.gbl...
Mantorok wrote:
Thanks very much - any way of doing it in classic-asp? Just out of
interest.

Kev

"Vadivel Kumar" <va******@vadivelk.net> wrote in message
news:ul**************@TK2MSFTNGP03.phx.gbl...
Mantorok wrote:
Is there any way, from ASP, ASP.Net or client-side scripting, to
determine whether the browser has client-scripting disabled?

Thanks
Kev
Check the below pasted MSDN code excerpt for finding whether browser
supports JS or not

using System;
using System.Web.UI;
using System.Web.UI.Adapters;

public class CustomControlAdapter : ControlAdapter
{
protected override void Render( HtmlTextWriter writer )
{
// Access Browser details through the Browser property.
Version jScriptVersion = Browser.JScriptVersion;

// Test if the browser supports Javascript.
if (jScriptVersion != null)
{
// Render JavaScript-aware markup.
}
else
{
// Render scriptless markup.
}
}
}

There is one more way to do this, check this article
(http://www.15seconds.com/issue/030303.htm) which works in .NET 1.1 as
well.

Let me know if you need any further clarifications.

-
Vadivel Kumar
http://vadivelk.net


I think, it is possible thru make a server-call inside <NOSCRIPT> tag
as similar like below,

<NOSCRIPT>
<%
// Make a server call and log that client doesn't have JS support
%>
<NOSCRIPT>

I am not sure about this way, since I've not tested. This is just a
thought.

-
Vadivel Kumar
http://vadivelk.net

Jun 27 '06 #5
Well,

I think there is a solution.
Just view the source of the file generated from asp.net for the below
code.
U can see the javascript generated.U can use that to find whether the
script is enabled or not

Cheers,

Thanigai


Mantorok wrote:
Ok thanks, we'll go with the ASP.net solution.

Kev

"Vadivel Kumar" <va******@vadivelk.net> wrote in message
news:O2**************@TK2MSFTNGP03.phx.gbl...
Mantorok wrote:
Thanks very much - any way of doing it in classic-asp? Just out of
interest.

Kev

"Vadivel Kumar" <va******@vadivelk.net> wrote in message
news:ul**************@TK2MSFTNGP03.phx.gbl...
Mantorok wrote:
> Is there any way, from ASP, ASP.Net or client-side scripting, to
> determine whether the browser has client-scripting disabled?
>
> Thanks
> Kev
Check the below pasted MSDN code excerpt for finding whether browser
supports JS or not

using System;
using System.Web.UI;
using System.Web.UI.Adapters;

public class CustomControlAdapter : ControlAdapter
{
protected override void Render( HtmlTextWriter writer )
{
// Access Browser details through the Browser property.
Version jScriptVersion = Browser.JScriptVersion;

// Test if the browser supports Javascript.
if (jScriptVersion != null)
{
// Render JavaScript-aware markup.
}
else
{
// Render scriptless markup.
}
}
}

There is one more way to do this, check this article
(http://www.15seconds.com/issue/030303.htm) which works in .NET 1.1 as
well.

Let me know if you need any further clarifications.

-
Vadivel Kumar
http://vadivelk.net


I think, it is possible thru make a server-call inside <NOSCRIPT> tag
as similar like below,

<NOSCRIPT>
<%
// Make a server call and log that client doesn't have JS support
%>
<NOSCRIPT>

I am not sure about this way, since I've not tested. This is just a
thought.

-
Vadivel Kumar
http://vadivelk.net


Jun 27 '06 #6

<st********@gmail.com> wrote in message
news:11**********************@c74g2000cwc.googlegr oups.com...
Well,

I think there is a solution.
Just view the source of the file generated from asp.net for the below
code.
U can see the javascript generated.U can use that to find whether the
script is enabled or not


But if scripting is disabled at the browser-end then that script will never
get executed, surely ;-)

Kev
Jun 27 '06 #7
This is likely the idea : do something client side using scripting. If you
see server side it has been done then scripting is enabled...

--
Patrice

"Mantorok" <ma******@mantorok.com> a écrit dans le message de news:
e7**********@newsfeed.th.ifl.net...

<st********@gmail.com> wrote in message
news:11**********************@c74g2000cwc.googlegr oups.com...
Well,

I think there is a solution.
Just view the source of the file generated from asp.net for the below
code.
U can see the javascript generated.U can use that to find whether the
script is enabled or not


But if scripting is disabled at the browser-end then that script will
never get executed, surely ;-)

Kev

Jun 27 '06 #8

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

Similar topics

4
by: Jane Austine | last post by:
I donwloaded win32all for Python 2.3 and installed it. I manually run pyscript.py and it returned "successfully registered" message. For a simple test(on client side), I created the following...
17
by: Karl Irvin | last post by:
To use the Textstream object, I had to set a Reference to the Microsoft Scripting Runtime. This works good with A2000 Is the Scripting Runtime included with A2002 and A2003 so the Reference...
2
by: James | last post by:
Are there any classes in c# for this or am I left to use the com interface, which I'm not sure how. And if I have this will it work on a machine that someone has disabled scripting? Finally,...
2
by: Charlie | last post by:
Hi: I would like to avoid a round trip to server for small things like changing enabled status of a dropdown list ASP.NET control. Can I apply client side scripting to change this property? ...
0
by: Roz Lee | last post by:
I need to determine whether the client browser has disabled the Active Scripting option in their browser security settings as they will be unable to log in to my asp.net site if they have, in which...
12
by: Tony Belding | last post by:
I'm interested in using an off-the-shelf interpreted language as a user-accessible scripting language for a MUCK. I'm just not sure if I can find one that does everything I need. The MUCK must be...
6
by: Tool69 | last post by:
Hi, I saw several old posts speaking of vim scripting in Python. This one in particular : http://www.velocityreviews.com/forums/t351303-re-pythonising-the-vim-eg-syntax-popups-gt-vimpst.html ...
12
by: jim | last post by:
I am new to web programming with javascript and I was wondering if javascript is the only scripting language that run in browsers like Firefox, IE and Opera or are there others? The scripting...
10
by: mukeshrasm | last post by:
Hi I have developed website using php and mysql and in that I have used JavaScript as well. I tried to run this website on different computer and set its browser's Active Scripting disabled. so...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.