smooth Cross browser java detection

Posted on 2003-02-24
Medium Priority
Last Modified: 2008-03-06
I know there was a lot of topics about this, but I didn't found any cross browser solution.

I have a java navigation menu for my web site, butt if client doesn't have java enabled / installed, i'd like to redirect him to another page. I found a good solution for netscape (navigator.javaenabled or something...) but what about IE, opéra and such browsers ??

Question by:mctd
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 35

Expert Comment

ID: 8007374
put the redirect code between the <applet> and </applet> tags

that should work...

Author Comment

ID: 8007428
already tried, didn't seemed to work (tested in IE6 with all VM checkboxes disabled). Did I miss something ?

I tryied this piece of code:

<applet Code="myApplet.class">
  <script language="JavaScript">
    alert("You do not have Java enabled");
    // some redirect code here

any other idea ?
LVL 35

Expert Comment

ID: 8007481
Apparently, the javaEnabled method exists in: IE4+, NN3+ and Opera 3.51+

I guess that is the only way to do it...and maybe put a text link to your other menu inside the Applet tag for those browsers that this call fails for (if there are any)...
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 35

Accepted Solution

TimYates earned 300 total points
ID: 8007503
maybe if you write a small applet with one method that returns true:

public class EnableCheck extends Applet
  public boolean isEnabled()
    return true ;

Then, put the following on your page:

<applet Code="EnableCheck.class" Width="0" Height="0" name="check" mayscript/>

Then, you should be able to do:

if( document.check.isEnabled() )
  // Java enabled :-)

Hmmm...not sure that helps...

Expert Comment

ID: 9059118
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.
LVL 15

Expert Comment

ID: 9671271
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept TimYates' comment as answer

Please leave any comments here within the next seven days.


EE Cleanup Volunteer

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses
Course of the Month10 days, 21 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question