/    Sign up×
Community /Pin to ProfileBookmark

Javascript to detect Java

Hello, I have been using a script to detect whether the viewer has Java installed and enabled. I thought it was working OK, but have since found that it works perfectly if the viewers Java is disabled (which is what XP2 does), but is not working in IE 6 when there is no Java installed. It fails gracefully. Could some kind soul please check my demo page [URL=http://www.videoedgevirtualtours.com/no_java.html]here[/URL] and see where I am going wrong.

Many thanks for any input.
E.

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@epocauthorMar 17.2005 — Thought I might show the actual source code rather than a link:

<script language="Javascript" type="text/javascript">

if(!navigator.javaEnabled()){

alert('NO JAVA Install!! This Virtual Tour requires Java to be installed and enabled. To install or enable, please follow instructions on the purple page that will open automatically behind the Virtual Tour page.');

window.open('help/nojava.html');

}

</script>

<script language="JavaScript">

This works in IE when Java is disabled, but doesn't when not installed.

Hoping for an answer.

Cheers

Epoc
Copy linkTweet thisAlerts:
@7studMar 17.2005 — If javascript had access to a user's computer, no one would have javasript enabled, so your script wouldn't work anyway.
Copy linkTweet thisAlerts:
@epocauthorMar 17.2005 — errrr??? By default XP doesn't come with Java. But does support javascript. One actually has to disable javascript manually. Java and javascript are 2 totally different things you know??
×

Success!

Help @epoc spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.10,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...