BrowserHawk IQ now available! Click here for the full scoop!
Search:
An extended property, such as plugins or screen size, is always is returned as -1
Created: 1/18/2001    Updated: 9/28/2004
Q   I am trying to detect Flash and other plug-ins. Even though I'm positive the plug-ins are installed, BrowserHawk is returning -1 for the Plugin_Flash property and for the other plugin properties. It is also returning -1 for the screen height and width. Why?

A   Examples of extended properties include all plug-in properties, screen resolution, properties that detect disabled settings, and more.

In order to detect extended properties, you must first do the following, depending on whether you are using the ActiveX/COM version of BH or the JavaBean:

ActiveX/COM

  • call the SetExtProperties method to tell BH exactly which extended properties you want it to test. For example: bhObj.SetExtProperties "Plugin_Flash, Height, Width"
  • call the GetExtPropertiesEx method to have BH perform the test. For example: bhObj.GetExtPropertiesEx
BrowserHawk for .NET
  • use the AddProperties method of the ExtendedOptions class to explictly tell BrowserHawk which tests you want it to perform. For example: extOptions.AddProperties("height, width").
  • call the GetExtendedBrowser method to have BH perform the test.
JavaBean (BrowserHawk4J)
  • create an integer that contains the flags for the tests you want to perform. For example: long extTest = ExtendedBrowserInfo.PLUGIN_FLASH | ExtendedBrowserInfo.HEIGHT | ExtendedBrowserInfo.WIDTH; This variable is then passed in the next step.
  • call the getExtendedBrowserInfo class to have BH4J perform the test. Don't forget to issue a "return;" statement immediately afterward if the returned result is null. For example: ext_test = getExtendedBrowserInfo
After doing so the values of the plug-in and other extended properties for the tests you asked BH to perform will be set correctly. Remember that other extended properties, such as checking screen size, browser window size, enabled/disabled settings also require these methods be called before checking the values of the properties. See the samples that ship with BrowserHawk - there are many which demonstrate extended property detection in detail.

    FAQ Home  |  Search FAQ  |  Show New Items  |  Ask a FAQ  |  Notify Me  |  Most Popular     
 
 
Copyright © 1994-2020 cyScape, Inc. All Rights Reserved. ()
ASP, ASP.NET, ColdFusion MX, CFMX, JSP, PHP