Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
sandeep Kumar
Ranch Hand
Posts: 41
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In HTML you have a noscript tag

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


You mean using an applet?

Eric
 
sandeep Kumar
Ranch Hand
Posts: 41
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic