1

i am having a application in which java script is must. but i am facing problem when at any client browser has java script disabled. i want a code using which i can check the browsers java script enabled/ disabled property so that the user cannot login until he enables javascript. can anyone help me in this code

2 Answers 2

8

You could simply have the "log in" button disabled by default and have it enabled by JavaScript when the document is loaded.

Also put a message saying the JavaScript is disabled on a page and make it visible by default. Upon document load, hide the message. Alternatively, use the <noscript> tag.

Sign up to request clarification or add additional context in comments.

6 Comments

way to think out of the box :) +1
but i need to give user a message about java script disable. otherwise he might not know what to do.
I'd also have a message directing a user to enable JS, which would be disabled by JS on page load
@Sumit Gupta: have the message show up by default, and then hide it as you show the login button with JS.
+1 @Sumit accept the answer, this is the way it should be done. Checking at the server side isn't reliable. As mentioned in the answer, use the <noscript> tag for whatever message you want to show to the user when javascript is disabled.
|
2

Take a look at this project

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.