Krishna
Krishna

Reputation: 7294

Detect javascript settings in browser

My requirement is that I have to check if the javascript is enabled or disabled in the browser. Because i am working on DOJO, if the javascript is disabled, application will not be running. If the javascript is disabled, i have to prompt the user to enable the javascript. Can anyone help me to find the way i can do that?

Upvotes: 0

Views: 139

Answers (2)

InternetSeriousBusiness
InternetSeriousBusiness

Reputation: 2635

You can use the noscript element.

The noscript element represents nothing if scripting is enabled, and represents its children if scripting is disabled. It is used to present different markup to user agents that support scripting and those that don't support scripting, by affecting how the document is parsed.

The best practice is to gracefully degrade, though.

Upvotes: 1

xdazz
xdazz

Reputation: 160833

You could use the noscript tag.

<noscript>Your need to enable javascript!</noscript>

Upvotes: 1

Related Questions