| Look at
the
javaEnabled()
method of the
navigator
object.
For instance, to make
a simple print-to-the page notification, place this script in the
<body> of your page:
<script>
var jEnabled = navigator.javaEnabled();
if (jEnabled){
document.write("JAVA is enabled.")
}else{
document.write("JAVA is <i>NOT</i> enabled.")
}
</script>
Here is a working example:
To redirect to a
given page based on whether or not JAVA is enabled, try this in the
<head> of your page:
<script>
var jEnabled = navigator.javaEnabled();
if (jEnabled){
window.location = "JAVA_page.html"
}else{
window.location = "non-JAVA_page.html"
}
</script>
Do remember, now --
we're talking about JAVA (as in applets, for instance), here, not
JavaScript. |