BrowserHawk IQ now available! Click here for the full scoop!
Search:
Error calling GetExtPropertiesEx from JScript
Created: 5/29/2002    Updated: 5/29/2002
Q   I prefer to use server-side JScript for my ASP scripting instead of VBScript. But when calling the GetExtPropertiesEx method I am receiving the following error: "The BrowserHawk GetExtPropertiesEx method is only available when used with ASP (no Context is available)". Everything works fine if I use VBScript instead of JScript.

A   This is a common question from developers using JScript. The problem occurs because typically the developer uses the "New ActiveXObject" approach to creating the cyScape.BrowserObj.

As a result of that syntax, an instance of BrowserHawk is created in isolation from the ASP context associated with the page the component is running under. Therefore the component does not have the resources it needs to perform the requested checks.

The solution is easy - just use the Server.CreateObject syntax instead of New ActiveXObject.

For example, do NOT do this:

   var bhObj = New ActiveXObject("cyScape.browserObj")
instead, do this:
  var bh = Server.CreateObject("cyScape.browserObj")
This will resolve the issue.

    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