The Item method provides a way to dynamically access property values using variables instead of hard coded property names.
Syntax:
propVal = bhObj.Item(propertyNameAsString)
or
propVal = bhObj(propertyNameAsString)
bhObj: an instance of the BrowserHawk component that you wish to retrieve a property value from.
propertyNameAsString: a variable which evaluates to a string value. This string value should match one of the BrowserHawk component’s property names.
Returns:
The value represented by the propertyNameAsString property. This value is automatically typecast to the type of variable which the propertyNameAsString property normally returns.
Example:
<%
set bhObj = Server.CreateObject("cyScape.browserObj")
prop1 = "DHTML"
canDoHTML = bhObj.Item(prop1)
if canDoHTML then
response.write "Your browser supports DHTML"
end if
set bhObj = Nothing
%>
Enumeration example:
<%
set bhObj = Server.CreateObject("cyScape.browserObj")
for each Property in bhObj
response.write "Property: " & Property
response.write ", Value: " & bhObj(Property) & "<br>"
next
set bhObj = Nothing
%>
Tip: For more information about using the Item method see Dynamic Property Access.
See Also:
Dynamic Property Access