Hi, I found some code that I tried.
There are two aspects of this No Java Virtual Machine detection.
Step 1: Copy the file NOJAVA.HTML into your virtual tour directory This file has a very polite message, and offers the reader the option of getting the CD from Microsoft or downloading it from a website (www.dhimaging.com.au). You are more than welcome to download the file yourself and change the HTML to point to the file's location on your web server.
Step 2: Immediately under the <BODY> command of the HTML file that you want check for Java Virtual Machine, simply cut and paste the following:
<SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT"> <!-- hide from old browsers (IE 4.0 and earlier) if (!navigator.javaEnabled()) { newWindow = window.open('nojava.html', 'newWin', 'width=420,height=260') } --> </SCRIPT>
Step 3: The result? An invisible Java Virtual Machine detector that works with JavaScript. It's all client-side, so no special server is required. HOWEVER, it will only work with Internet Explorer 4.0 and newer, or Netscape Navigator 3.0 or later. It is *cross platform*, but keep the version in mind.
Here is an example html page that the code referes to:
<HTML> <HEAD> <TITLE>No Java Virtual Machine</TITLE> </HEAD> <BODY>
<CENTER> <TABLE BORDER=2> <TD WIDTH=400 ALIGN=CENTER> Java is NOT enabled on this machine.<BR> You will need Java Virtual Machine in order to<BR> see the Virtual Tours on this site.<BR> Sometimes JVM is <B>not</B> installed on some computers.<BR> For example, Internet Explorer 6 does not come with it.<BR> Also, Windows XP may not have it installed either.<BR> The file is available free from Microsoft via a CD...<BR> Or you can download it from our website by clicking the link below.<BR> Please click <a title='http://www.dhimaging.com.au/downloads/utilities/Msjavx86.exe'>here</a> to download and install it.<BR> </TD> </TABLE> <BR> <A title="javascript:window.close();">Click Here to Close This Window</A> </CENTER>
</BODY> </HTML>
Hope this helps.
|