Scripts may not run on a local HTML Web page that references .htc or .xml files in Windows XP Service Pack 2 or Windows XP Tablet PC Edition 2005 (884322)



The information in this article applies to:

  • Microsoft Windows XP Professional Service Pack 2 (SP2)
  • Microsoft Windows XP Home Edition Service Pack 2 (SP2)
  • Microsoft Windows XP Media Center Edition Service Pack 2 (SP2)
  • Microsoft Windows XP Tablet PC Edition 2005

SYMPTOMS

When you use Microsoft Internet Explorer to open an HTML Web page that is located on your local computer that is running Microsoft Windows XP Service Pack 2 (SP2) or Microsoft Windows XP Tablet PC Edition 2005, a script that references .htc or .xml files may not run as expected.

CAUSE

This issue may occur when the HTML Web page, the .htc file, and the .xml file are all located on your local computer.

WORKAROUND

To work around this issue, use one of the following methods.

Method 1: Insert a Mark of the Web comment in your HTML files

When you insert the Mark of the Web comment in HTML file, Internet Explorer applies Internet Zone settings to the Web page. To insert a Mark of the Web comment in an HTML file, follow these steps:
  1. Open the HTML file in Notepad or an HTML Editor.
  2. Type one of the following a comments in the HTML file:
    • <!-- saved from url=(0013)about:internet --> 
    • <!-- saved from url=(0022)http://www.urlname.com --> 
    Note The number is parenthesis is the number of characters in the URL that follows.
  3. Save the HTML file.
Note The Mark of the Web comment works in Microsoft Internet Explorer 4 and later versions. As part of changes to Internet Explorer in Windows XP SP2, this HTML comment can also be used with multipart HTML (.mht) files, and.xml files. You cannot use a Mark of the Web comment in .mht or .xml files if you use earlier versions of Internet Explorer.

Method 2: Use a local share

Create a shared folder on your local computer, and then save the Web page and all the referenced .htc and .xml files to this shared folder. Then, in Internet Explorer, add the shared folder as a trusted site.

Note To add the shared folder as a trusted site, click Internet Options on the Tools menu, and then click the Security tab.

Method 3: Use HTAs

Use HTML Applications (HTAs) instead of HTML files.

For more information about HTAs, visit the following Microsoft Web site:

Method 4: Create a new program

Create a Web-based solution that hosts the HTML content in the Internet Explorer Web Object Control (WebOC). For more information about how to develop Web-based solutions for Internet Explorer, visit the following Microsoft Web sites:

Modification Type:MajorLast Reviewed:4/21/2006
Keywords:kbtshoot kbprb KB884322 kbAudDeveloper kbAudEndUser