Help and Support

PRB: Pop-up Window Must Use a Unique HTML Help Object ID

Article ID:196795
Last Review:March 16, 2005
Revision:1.1
This article was previously published under Q196795

SYMPTOMS

When you open a pop-up window using the HTML Help ActiveX control (HHCtrl.ocx), the following error message appears in Internet Explorer 4.0:
Error : Object doesn't support this property or method.

Back to the top

CAUSE

This occurs when multiple instances of the HTML Help control are embedded on a Web page. When these controls use the same ID, Internet Explorer generates this error.

Back to the top

RESOLUTION

To fix this problem, identify the HTML Help object that the pop-up window uses and change the object's ID to a unique name. See the MORE INFORMATION section of this article for an example.

Back to the top

STATUS

This behavior is by design.

Back to the top

MORE INFORMATION

You can use the following HTML code to embed the HTML Help control on a Web page. It also creates a hyperlink that calls the TextPopup() method of the control to display a pop-up window:
   <SCRIPT>MyText="A Popup Example"</SCRIPT>
   
   <OBJECT ID=hhctrl TYPE="application/x-oleobject"
   CLASSID="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
   </OBJECT>
				


   <A HREF=
   JavaScript:hhctrl.TextPopup(MyText,"Verdana,10",9,9,-1,-1)>
   Click here to display an example of an HTML Help pop-up window!</A>.
   <P>
				
NOTE: The ID of this HTML Help object is "hhctrl." The error occurs when there are other HTML Help objects in the same file that share that ID.

In this example, you need to change the ID in two places. The <OBJECT> tag's ID parameter should be changed from "hhctrl" to a unique identifier name. This name is also used in the <HREF> tag to invoke the TextPopup method. The following code illustrates how to change the previous HTML code to use the identifier "hhcustom":
   <SCRIPT>MyText="A Popup Example"</SCRIPT>
   
   <OBJECT ID=hhcustom TYPE="application/x-oleobject"
   CLASSID="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
   </OBJECT>
				


   <A HREF=
   JavaScript:hhcustom.TextPopup(MyText,"Verdana,10",9,9,-1,-1)>
   Click Here to Display an Example of an HTML Help pop-up window!</A>.
   <P>
				

Back to the top

REFERENCES

The HTML Help Web site:
http://www.msdn.microsoft.com/workshop (http://www.msdn.microsoft.com/workshop)
For more information about pop-up windows, see the following documentation:

HTML Help Workshop Online Help: Using HTML Help Workshop; Create Help Windows; "Creating a pop-up window"

Back to the top


APPLIES TO
Microsoft HTML Help 1.3
Microsoft HTML Help 1.0
Microsoft HTML Help 1.1
Microsoft HTML Help 1.21

Back to the top

Keywords: 
kbprb KB196795

Back to the top

Article Translations

 

Other Support Options

  • Contact Microsoft
    Phone Numbers, Support Options and Pricing, Online Help, and more.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.