tags:

views:

116

answers:

2

Hi

In javascript how to enable Internetoptions/Adavanced/Enable client scripts Programatically..

Intention is, If web client has disabled the client Script, our code need to programmatically enable...

Can you please suggest..?

Thanks Karthik

+5  A: 

There is NO way to do this programatically using JavaScript. You can use the <noscript> tag though to inform the users that they have JS disabled, and inform them how to enable it, if they want to enable it.

Kirtan
I disagree with the "unfortunately" part. I think that as a computer user, it is very fortunate that it isn't easily possible for sites to mess with my settings. Otherwise, a good answer! +1
Cerebrus
+5  A: 

You need to get one thing straight - Respect your users!

If script execution is disabled, it must be for a reason. Please do not even attempt to override user settings. This is not to say that you would be successful at such things easily. I doubt if you would find a webbrowser that would allow you change the user's registry settings without their explicit consent.

That said, your code should gracefully degrade according the browser capabilities. If your site cannot run without script enabled, it is better to provide explicit disclaimer on the site asking users to enable it. As Kirtan already said, the <noscript> tag is a way to do just this.

Cerebrus
Agreed! +1 for that.
Kirtan