Type: Boolean
Returns True if the browser is set to allow Java to run if Java is available on the user's machine, False otherwise.
Note: You must call the GetExtPropertiesEx method before checking the value of this property. This property requires either the Professional or Enterprise Edition of BrowserHawk.
Tip: See the extproperties.asp example located in your BrowserHawk directory for detailed information and examples on using this property.
Example:
<%
set bhObj = Server.CreateObject("cyScape.browserObj")
bhObj.SetExtProperties "JavaEnabled"
bhObj.GetExtPropertiesEx
%>
Your Java applets enabled/disabled state is:
<% if NOT bhObj.JavaApplets then %>
Not supported with this browser
<% elseif bhObj.JavaEnabled then %>
Enabled
<% elseif NOT bhObj.JavaScriptEnabled then %>
Not detectable with JavaScript disabled
<% elseif bhObj.browser = "IE" and bhObj.majorver = 3 then
Not detectable with IE 3.x.
<% else %>
Disabled
<% end if %>
Special notes for this property:
It is not possible to detect disabled Java applets for visitors using Microsoft Internet Explorer versions 3.x or earlier. For these two browsers JavaEnabled will always be False, even if the visitor’s Java is enabled.
The beta version of Netscape 6.0 does not properly report disabled Java. Therefore the JavaEnabled property will always be False for this browser.
Under Netscape 6 and IE on Windows XP the JavaEnabled property may return True but the browser will only be able to run your applet if they have the Java plug-in is installed. When testing if Java is enabled under Netscape 6 and IE on Windows XP you must also check the Plugin_JavaVer property - if JavaEnabled is True AND Plugin_JavaVer is not "" then Java is enabled and available. Otherwise it is not, and if you try to put an applet on the page under this circumstance the browser will display 'Click here to get plugin'. Likewise you can also detect when no Java is available under Netscape 6.0 and IE on Windows XP by checking the JavaVersion property to see if it contains "Java N/A". For IE On Windows XP you can also check the MSJVMBuild property – if it returns something other than a blank string than you know the Microsoft JVM is at least installed.
See Also: