[Javascript] detect js
Paul Novitski
paul at novitskisoftware.com
Fri Jan 28 00:37:28 CST 2005
At 09:42 PM 1/27/2005, Iztok Polanic wrote:
>Does anybody have any idea how to prevent a user from logging into
>applications, if he/she doesn't have js enabled? I tried several ideas but
>none of them works.
Iztok,
You can use javascript to create the log-in input dialog for the
user. Without js enabled, there's no way to log in. The specific
techniques that come to mind are:
- insert the log-in input fields into the document;
- use the javascript prompt() function to bring up an input dialog for log-in;
- use the javascript open() function to create a child window containing
the input fields.
Another less guaranteed method would be to include the log-in input fields
in the page but suppress them from display with CSS, such as:
<input style="display: none;" type="text" ... />
Then use javascript to change the display to block. This technique
wouldn't work if the user agent didn't process CSS.
Paul
More information about the Javascript
mailing list