?
Solved

smooth Cross browser java detection

Posted on 2003-02-24
7
Medium Priority
?
175 Views
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 ??

Thanks
0
Comment
Question by:mctd
[X]
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
7 Comments
 
LVL 35

Expert Comment

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

that should work...
0
 

Author Comment

by:mctd
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
  </script>
</applet>


any other idea ?
0
 
LVL 35

Expert Comment

by:TimYates
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)...
0
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

by:
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...
0
 

Expert Comment

by:CleanupPing
ID: 9059118
mctd:
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 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 15

Expert Comment

by:jimmack
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.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jimmack
EE Cleanup Volunteer
0

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