-
Recognizing a Browser's Java Support
Greetings!
I need to find out how a web page can find out if a browser supports Java. The recognition of a browser's Java support should help me to prevent the gray display of Java applets if the browser does not support Java.
Thanks for your time and help,
Sven Littkowski
-
I found this snippet:
Code:
<script language="JavaScript"><!--
if (navigator.appName == 'Microsoft Internet Explorer' && navigator.appVersionindexOf('MSIE 3'))
var java = false;
else
var java = navigator.javaEnabled();
//--></script>
If you do this in the initial phaze of the web page you may open another page
or change the html via javascript.
Last edited by sjalle; 10-16-2005 at 06:25 PM.
eschew obfuscation
-
Hello S. Jalle,
many sincere thanks for your speedy response. But I believe that this Java code (which again requires Java acceptance) does nothing else then only testing for the IE browser version. It actually says nothing else than: "If it is the IE version 3 (or before) than just don't use Java".
Thanks, still, for your help. However, I am still open and thankful for further helps, suggestions and Kentucky Fried Chickens, everyone is welcome to help me!
Greetings,
-
Oh ?
Code:
var java = navigator.javaEnabled();
The code line above test wether java is supported & enabled in the current
browser. This feature was added at JavaScript 1.1
But I believe that this Java code (which again requires Java acceptance)...
Its javascript.
Ps: Is the problem the redirection to another page ?
Last edited by sjalle; 10-17-2005 at 05:44 AM.
eschew obfuscation
-
Hi, Jalle.
No, not the redirection is the problem. I just wonder if someone can disable Java so entirely that even this code you just listed wouldn't work anymore, not surer about it.
I know Java applets would be disabled. But would the disabled Java cause even simple, open Java script not to work anymore? Or would the simple Java script still work?
Greetings,
Sven
-
Hi, the nick sjalle....
...and the problem is javascript, not java. There is no connection
between a browsers java applet capabilities and the browsers javascript
capabilities.
But they have one thing in common, the letters "java".
The java applet is run by the java vm, the javascript is
interpreted by the browser. It is possible to disable javascript for a
browser, but I hesitate to call that a functional browser....
The various browsers disagree on the way they
have implemented javascript, but thats another ballgame...
eschew obfuscation
Similar Threads
-
By Mike Tsakiris in forum .NET
Replies: 11
Last Post: 10-04-2002, 05:32 PM
-
By Dharmesh in forum .NET
Replies: 4
Last Post: 10-01-2001, 03:47 PM
-
By Tim Romano in forum Talk to the Editors
Replies: 1
Last Post: 07-27-2001, 08:05 AM
-
By Debbie Locker in forum Talk to the Editors
Replies: 8
Last Post: 07-24-2001, 07:50 PM
-
By Debbie Locker in forum Java
Replies: 0
Last Post: 07-18-2001, 08:47 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks