aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes To test if java script is enabled in client browser or not Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "To test if java script is enabled in client browser or not" Watch "To test if java script is enabled in client browser or not" New topic
Author

To test if java script is enabled in client browser or not

sandeep Kumar
Ranch Hand

Joined: Sep 19, 2007
Posts: 41
Hi All,

I need small help.
I would like to know "How to test if javascript is enabled or not using Java in client's browser.

Any pointer or a code snippet will be helpful.

Thanks in Advance.

Regards,
Sandeep.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
In HTML you have a noscript tag

...using Java in client's browser...


You mean using an applet?

Eric
sandeep Kumar
Ranch Hand

Joined: Sep 19, 2007
Posts: 41
Hi Eric,

First of all thanks for your reply.

I just wanted to check if on client's machine java script is enabled or disabled from my java file (servlet or JSP)
and accordingly request will be navigated to specified JSP page.

I have tried with <noscript> tag using in a <form> element in JSP. But seems to be not working. I have tried with IE7.

Please find the below code.



This code always returns null, either active script option is enabled or disabled.

In IE7, I have disabled the java script using:

Tools --> Internet options --> "security" tab --> "Custom level" button --> Scripting --> Active scripting



Thanks to suggest me on this.

Thanks & Regards,
Sandeep.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: To test if java script is enabled in client browser or not