Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-24-2012, 02:22 PM   PM User | #1
fat
New Coder

 
Join Date: Jun 2009
Posts: 20
Thanks: 1
Thanked 0 Times in 0 Posts
fat is an unknown quantity at this point
Question IE Java Applet client user test

hi

I want to test whether a user with internet explorer browser that visits my site has java installed and enabled.

is there a way to do a test like that in javascript or any other way ?


thanks
fat is offline   Reply With Quote
Old 09-24-2012, 02:24 PM   PM User | #2
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,036
Thanks: 197
Thanked 2,411 Times in 2,389 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
Quote:
Originally Posted by fat View Post
hi

I want to test whether a user with internet explorer browser that visits my site has java installed and enabled.

is there a way to do a test like that in javascript or any other way ?


thanks
In a word, no.

All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.
__________________

All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.
Philip M is offline   Reply With Quote
Old 09-24-2012, 03:25 PM   PM User | #3
fat
New Coder

 
Join Date: Jun 2009
Posts: 20
Thanks: 1
Thanked 0 Times in 0 Posts
fat is an unknown quantity at this point
Quote:
Originally Posted by Philip M View Post
In a word, no.

All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.
can you elaborate please ? I just want to show the user a message or warning of some kind that tells the user he has no Java support.

wouldn't this work:
http://mapskp.cesr.fr/tools/javaplug...lugin_test.php ?
fat is offline   Reply With Quote
Old 09-24-2012, 03:59 PM   PM User | #4
xelawho
Senior Coder

 
xelawho's Avatar
 
Join Date: Nov 2010
Posts: 2,437
Thanks: 52
Thanked 454 Times in 452 Posts
xelawho will become famous soon enoughxelawho will become famous soon enough
I think this kind of comes close:
Code:
if (navigator.javaEnabled()&&navigator.appName == 'Microsoft Internet Explorer'){
alert("IE java enabled")
}
but navigator sniffing is hugely unreliable - people can make their browser appear to be whatever they like.
xelawho is offline   Reply With Quote
Old 09-24-2012, 04:04 PM   PM User | #5
WolfShade
Regular Coder

 
Join Date: Apr 2012
Location: St. Louis, MO, USA
Posts: 946
Thanks: 7
Thanked 97 Times in 97 Posts
WolfShade is an unknown quantity at this point
Does it have to be specifically IE? You could just use navigator.javaEnabled() for all browsers. I tested an alert for IE, FF, and Chrome, and it worked in all three.

UPDATE: I disabled Java in my IE8 and tested using navigator.javaEnabled() - it still shows as enabled. ???
__________________
^_^

If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
*
The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".

Last edited by WolfShade; 09-24-2012 at 04:12 PM..
WolfShade is offline   Reply With Quote
Old 09-24-2012, 04:20 PM   PM User | #6
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,036
Thanks: 197
Thanked 2,411 Times in 2,389 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
Quote:
Originally Posted by WolfShade View Post
Does it have to be specifically IE? You could just use navigator.javaEnabled() for all browsers. I tested an alert for IE, FF, and Chrome, and it worked in all three.

UPDATE: I disabled Java in my IE8 and tested using navigator.javaEnabled() - it still shows as enabled. ???
http://javatester.org/enabled.html

"In Internet Explorer 8 under Windows 7, it's hopeless. Nothing prevents Java from running"

Perhaps I have misunderstood the question. There is no way that the site owner can become aware of whether the specific user has Java enabled or not.
__________________

All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.

Last edited by Philip M; 09-24-2012 at 04:22 PM..
Philip M is offline   Reply With Quote
Old 09-24-2012, 04:56 PM   PM User | #7
WolfShade
Regular Coder

 
Join Date: Apr 2012
Location: St. Louis, MO, USA
Posts: 946
Thanks: 7
Thanked 97 Times in 97 Posts
WolfShade is an unknown quantity at this point
Quote:
"In Internet Explorer 8 under Windows 7, it's hopeless. Nothing prevents Java from running"
Why does this not surprise me? No wonder all the hackers and script-kiddies target Micro$oft.. they leave themselves open to it.

smh
__________________
^_^

If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
*
The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".
WolfShade is offline   Reply With Quote
Old 09-24-2012, 05:41 PM   PM User | #8
WolfShade
Regular Coder

 
Join Date: Apr 2012
Location: St. Louis, MO, USA
Posts: 946
Thanks: 7
Thanked 97 Times in 97 Posts
WolfShade is an unknown quantity at this point
Apparently, it's the same for Chrome. Either that, or javaEnabled() doesn't work. I disabled the Java plugin in Chrome v20, and the alert still shows.

^_^
__________________
^_^

If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
*
The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".
WolfShade is offline   Reply With Quote
Old 09-27-2012, 09:02 AM   PM User | #9
fat
New Coder

 
Join Date: Jun 2009
Posts: 20
Thanks: 1
Thanked 0 Times in 0 Posts
fat is an unknown quantity at this point
but what about this method:
http://mapskp.cesr.fr/tools/javaplug...lugin_test.php

it looks like the solution
fat is offline   Reply With Quote
Old 09-27-2012, 10:51 AM   PM User | #10
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,036
Thanks: 197
Thanked 2,411 Times in 2,389 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
Quote:
Originally Posted by fat View Post
but what about this method:
http://mapskp.cesr.fr/tools/javaplug...lugin_test.php

it looks like the solution
Well, I have Java enabled in IE9 and received the result

Java Applet failed to load. Is Java enabled in your browser?

Does not seem very reliable.

I stick with my original answer - no. JavaScript has no capability to access the client's operating system or the Windows registry, or alter the default behaviour of the browser.
__________________

All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.

Last edited by Philip M; 09-27-2012 at 11:06 AM..
Philip M is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:45 PM.


Advertisement
Log in to turn off these ads.