Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

smooth Cross browser java detection

Posted on 2003-02-24
7
Medium Priority
?
176 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
6 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Question has a verified solution.

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

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Suggested Courses
Course of the Month13 days, 21 hours left to enroll

580 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